com.thinkaurelius.titan.graphdb.idmanagement

## Class IDManager

- java.lang.Object
- - com.thinkaurelius.titan.graphdb.idmanagement.IDManager

-     public class IDManager
      extends Object

  Handles the allocation of ids based on the type of element Responsible for the bit-wise pattern of Titan's internal id scheme.
  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `IDManager.VertexIDType` bit mask- Description (+ indicates defined type, * indicates proper & defined type) 0 - + User created Vertex 000 - * Normal vertices 010 - * Partitioned vertices 100 - * Unmodifiable (e.g.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static long` | `MAX_PADDING_BITWIDTH` The maximum number of padding bits of any type
    `static int` | `PARTITIONED_VERTEX_PARTITION`
    `static int` | `SCHEMA_PARTITION` Id of the partition that schema elements are assigned to
    `static int` | `TYPE_LEN_RESERVE` Number of bits that need to be reserved from the type ids for storing additional information during serialization
    `static long` | `USERVERTEX_PADDING_BITWIDTH` The padding bit with for user vertices

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IDManager()`
    `IDManager(long partitionBits)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static long` | `addRelationTypePadding(long id)`
    `long` | `getCanonicalVertexId(long partitionedVertexId)`
    `IDInspector` | `getIdInspector()`
    `StaticBuffer` | `getKey(long vertexid)`
    `long` | `getKeyID(StaticBuffer b)`
    `long` | `getPartitionBound()`
    `long` | `getPartitionedVertexId(long partitionedVertexId, long otherPartition)`
    `long[]` | `getPartitionedVertexRepresentatives(long partitionedVertexId)`
    `long` | `getPartitionHashForId(long id)`
    `long` | `getPartitionId(long vertexid)`
    `long` | `getRelationCountBound()`
    `long` | `getRelationID(long count, long partition)`
    `static long` | `getSchemaCountBound()`
    `static long` | `getSchemaId(IDManager.VertexIDType type, long count)`
    `static long` | `getTemporaryRelationID(long count)`
    `static long` | `getTemporaryVertexID(IDManager.VertexIDType type, long count)`
    `long` | `getVertexCountBound()`
    `long` | `getVertexID(long count, long partition, IDManager.VertexIDType vertexType)`
    `boolean` | `isCanonicalVertexId(long partitionVertexId)`
    `boolean` | `isPartitionedVertex(long id)`
    `static boolean` | `isSystemRelationTypeId(long id)`
    `static boolean` | `isTemporary(long id)`
    `static long` | `stripEntireRelationTypePadding(long id)`
    `static long` | `stripRelationTypePadding(long id)`

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

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

- - ### Field Detail

    - #### SCHEMA_PARTITION

          public static final int SCHEMA_PARTITION

      Id of the partition that schema elements are assigned to
      See Also:
        Constant Field Values

    - #### PARTITIONED_VERTEX_PARTITION

          public static final int PARTITIONED_VERTEX_PARTITION

      See Also:
        Constant Field Values

    - #### TYPE_LEN_RESERVE

          public static final int TYPE_LEN_RESERVE

      Number of bits that need to be reserved from the type ids for storing additional information during serialization
      See Also:
        Constant Field Values

    - #### USERVERTEX_PADDING_BITWIDTH

          public static final long USERVERTEX_PADDING_BITWIDTH

      The padding bit with for user vertices

    - #### MAX_PADDING_BITWIDTH

          public static final long MAX_PADDING_BITWIDTH

      The maximum number of padding bits of any type

  - ### Constructor Detail

    - #### IDManager

          public IDManager(long partitionBits)

    - #### IDManager

          public IDManager()

  - ### Method Detail

    - #### getPartitionBound

          public long getPartitionBound()

    - #### getPartitionId

          public long getPartitionId(long vertexid)

    - #### getKey

          public StaticBuffer getKey(long vertexid)

    - #### getKeyID

          public long getKeyID(StaticBuffer b)

    - #### getRelationID

          public long getRelationID(long count,
                           long partition)

    - #### getVertexID

          public long getVertexID(long count,
                         long partition,
                         IDManager.VertexIDType vertexType)

    - #### getPartitionHashForId

          public long getPartitionHashForId(long id)

    - #### getCanonicalVertexId

          public long getCanonicalVertexId(long partitionedVertexId)

    - #### isCanonicalVertexId

          public boolean isCanonicalVertexId(long partitionVertexId)

    - #### getPartitionedVertexId

          public long getPartitionedVertexId(long partitionedVertexId,
                                    long otherPartition)

    - #### getPartitionedVertexRepresentatives

          public long[] getPartitionedVertexRepresentatives(long partitionedVertexId)

    - #### isPartitionedVertex

          public boolean isPartitionedVertex(long id)

    - #### getRelationCountBound

          public long getRelationCountBound()

    - #### getVertexCountBound

          public long getVertexCountBound()

    - #### getTemporaryRelationID

          public static long getTemporaryRelationID(long count)

    - #### getTemporaryVertexID

          public static long getTemporaryVertexID(IDManager.VertexIDType type,
                                  long count)

    - #### isTemporary

          public static boolean isTemporary(long id)

    - #### getSchemaId

          public static long getSchemaId(IDManager.VertexIDType type,
                         long count)

    - #### stripEntireRelationTypePadding

          public static long stripEntireRelationTypePadding(long id)

    - #### stripRelationTypePadding

          public static long stripRelationTypePadding(long id)

    - #### addRelationTypePadding

          public static long addRelationTypePadding(long id)

    - #### isSystemRelationTypeId

          public static boolean isSystemRelationTypeId(long id)

    - #### getSchemaCountBound

          public static long getSchemaCountBound()

    - #### getIdInspector

          public IDInspector getIdInspector()

Copyright © 2012–2014. All rights reserved.