org.eclipse.emf.cdo.util

## Class CDOBalancedTree

- java.lang.Object
- - org.eclipse.emf.cdo.util.CDOBalancedTree

-     public class CDOBalancedTree
      extends Object

  A utility class that attaches `objects` to a `folder` rooted, balanced tree such that configurable capacities for resources per folder and objects per resource are never exceeded. This class is useful if a large number of objects does not form a tree naturally but long lists would hinder fast lazy loading.
  Since:
    4.1
  Author:
    Eike Stepper

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_CAPACITY`
    `static int` | `DEFAULT_LOCK_TIMEOUT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CDOBalancedTree(CDOResourceFolder root)`
    `CDOBalancedTree(CDOResourceFolder root, int nodeCapacity)`
    `CDOBalancedTree(CDOResourceFolder root, int folderCapacity, int resourceCapacity)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addObject(EObject object)`
    `int` | `getFolderCapacity()`
    `int` | `getLockAttempts()`
    `long` | `getLockTimeout()`
    `int` | `getResourceCapacity()`
    `CDOResourceFolder` | `getRoot()`
    `void` | `setLockAttempts(int lockAttempts)`
    `void` | `setLockTimeout(long lockTimeout)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_CAPACITY

          public static final int DEFAULT_CAPACITY

      See Also:
        Constant Field Values

    - #### DEFAULT_LOCK_TIMEOUT

          public static final int DEFAULT_LOCK_TIMEOUT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### CDOBalancedTree

          public CDOBalancedTree(CDOResourceFolder root,
                                 int folderCapacity,
                                 int resourceCapacity)

    - #### CDOBalancedTree

          public CDOBalancedTree(CDOResourceFolder root,
                                 int nodeCapacity)

    - #### CDOBalancedTree

          public CDOBalancedTree(CDOResourceFolder root)

  - ### Method Detail

    - #### getRoot

          public final CDOResourceFolder getRoot()

    - #### getFolderCapacity

          public final int getFolderCapacity()

    - #### getResourceCapacity

          public final int getResourceCapacity()

    - #### getLockAttempts

          public final int getLockAttempts()

    - #### setLockAttempts

          public final void setLockAttempts(int lockAttempts)

    - #### getLockTimeout

          public final long getLockTimeout()

    - #### setLockTimeout

          public final void setLockTimeout(long lockTimeout)

    - #### addObject

          public void addObject(EObject object)

Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html