com.thinkaurelius.titan.graphdb.database.idhandling

## Class IDHandler

- java.lang.Object
- - com.thinkaurelius.titan.graphdb.database.idhandling.IDHandler

-     public class IDHandler
      extends Object

  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `IDHandler.DirectionID`
    `static class` | `IDHandler.EdgeTypeParse`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static StaticBuffer` | `MAX_KEY`
    `static StaticBuffer` | `MIN_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IDHandler()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `edgeTypeLength(long etid)`
    `static StaticBuffer[]` | `getBounds(RelationCategory type, boolean systemTypes)`
    `static StaticBuffer` | `getEdgeType(long etid, IDHandler.DirectionID dirID, boolean hidden)`
    `static IDHandler.EdgeTypeParse` | `readEdgeType(ReadBuffer in)`
    `static long` | `readInlineEdgeType(ReadBuffer in)`
    `static void` | `writeEdgeType(WriteBuffer out, long etid, IDHandler.DirectionID dirID, boolean hidden)` The edge type is written as follows: [ Hidden & System (2 bit) | Relation-Type-ID (1 bit) | Relation-Type-Count (variable) | Direction-ID (1 bit)] Would only need 1 bit to store relation-type-id, but using two so we can upper bound.
    `static void` | `writeInlineEdgeType(WriteBuffer out, long etid)`

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

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

- - ### Field Detail

    - #### MIN_KEY

          public static final StaticBuffer MIN_KEY

    - #### MAX_KEY

          public static final StaticBuffer MAX_KEY

  - ### Constructor Detail

    - #### IDHandler

          public IDHandler()

  - ### Method Detail

    - #### edgeTypeLength

          public static int edgeTypeLength(long etid)

    - #### writeEdgeType

          public static void writeEdgeType(WriteBuffer out,
                           long etid,
                           IDHandler.DirectionID dirID,
                           boolean hidden)

      The edge type is written as follows: [ Hidden & System (2 bit) | Relation-Type-ID (1 bit) | Relation-Type-Count (variable) | Direction-ID (1 bit)] Would only need 1 bit to store relation-type-id, but using two so we can upper bound.
      Parameters:
        `out` -
        `etid` -
        `dirID` -

    - #### getEdgeType

          public static StaticBuffer getEdgeType(long etid,
                                 IDHandler.DirectionID dirID,
                                 boolean hidden)

    - #### readEdgeType

          public static IDHandler.EdgeTypeParse readEdgeType(ReadBuffer in)

    - #### writeInlineEdgeType

          public static void writeInlineEdgeType(WriteBuffer out,
                                 long etid)

    - #### readInlineEdgeType

          public static long readInlineEdgeType(ReadBuffer in)

    - #### getBounds

          public static StaticBuffer[] getBounds(RelationCategory type,
                                 boolean systemTypes)

Copyright © 2012–2014. All rights reserved.