com.thinkaurelius.titan.graphdb.database.idassigner

## Class StaticIDBlockSizer

- java.lang.Object
- - com.thinkaurelius.titan.graphdb.database.idassigner.StaticIDBlockSizer

- All Implemented Interfaces:
    IDBlockSizer

      public class StaticIDBlockSizer
      extends Object
      implements IDBlockSizer

  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StaticIDBlockSizer(long blockSize, long blockSizeLimit)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getBlockSize(int idNamespace)` The size of the id block to be returned by calls `IDAuthority.getIDBlock(int,int, com.thinkaurelius.titan.core.attribute.Duration)` for the given id namespace.
    `long` | `getIdUpperBound(int idNamespace)` Returns the upper bound for any id block returned by `IDAuthority.getIDBlock(int,int, com.thinkaurelius.titan.core.attribute.Duration)` for the given id namespace.

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

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

- - ### Constructor Detail

    - #### StaticIDBlockSizer

          public StaticIDBlockSizer(long blockSize,
                            long blockSizeLimit)

  - ### Method Detail

    - #### getBlockSize

          public long getBlockSize(int idNamespace)

      Description copied from interface: `IDBlockSizer`
      The size of the id block to be returned by calls `IDAuthority.getIDBlock(int,int, com.thinkaurelius.titan.core.attribute.Duration)` for the given id namespace. In other words, for the returned array of the above mentioned call, it must hold that the difference between the second and first value is equal to the block size returned by this method (for the same partition id).
      Specified by:
        `getBlockSize` in interface `IDBlockSizer`
      Returns:

    - #### getIdUpperBound

          public long getIdUpperBound(int idNamespace)

      Description copied from interface: `IDBlockSizer`
      Returns the upper bound for any id block returned by `IDAuthority.getIDBlock(int,int, com.thinkaurelius.titan.core.attribute.Duration)` for the given id namespace. In other words, it must hold that the second value of the returned array is smaller than this value for the same partition id.
      Specified by:
        `getIdUpperBound` in interface `IDBlockSizer`
      Returns:

Copyright © 2012–2014. All rights reserved.