public class IDManager extends Object
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.
|
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 width for user vertices
|
Constructor and Description |
---|
IDManager() |
IDManager(long partitionBits) |
Modifier and Type | Method and Description |
---|---|
static long |
addRelationTypePadding(long id) |
long |
fromVertexId(long id)
Converts a JanusGraph vertex id to the user provided id as the inverse mapping of
toVertexId(long) . |
long |
getCanonicalVertexId(long partitionedVertexId) |
StaticBuffer |
getKey(Object 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 |
isEdgeLabelId(Object id) |
boolean |
isGenericSchemaVertexId(Object id) |
boolean |
isPartitionedVertex(Object id) |
boolean |
isPropertyKeyId(Object id) |
boolean |
isRelationTypeId(Object id) |
boolean |
isSchemaVertexId(Object id) |
static boolean |
isSystemRelationTypeId(Object id) |
static boolean |
isTemporary(long id) |
boolean |
isUnmodifiableVertex(Object id) |
boolean |
isUserVertexId(Object vertexId) |
boolean |
isVertexLabelVertexId(Object id) |
static long |
stripEntireRelationTypePadding(long id) |
static long |
stripRelationTypePadding(long id) |
long |
toVertexId(long id)
Converts a user provided long id into a JanusGraph vertex id.
|
public static final int SCHEMA_PARTITION
public static final int PARTITIONED_VERTEX_PARTITION
public static final int TYPE_LEN_RESERVE
public static final long USERVERTEX_PADDING_BITWIDTH
public static final long MAX_PADDING_BITWIDTH
public long getPartitionBound()
public final boolean isUserVertexId(Object vertexId)
public long getPartitionId(long vertexId)
public StaticBuffer getKey(Object vertexId)
public long getKeyID(StaticBuffer b)
public long getRelationID(long count, long partition)
public long getVertexID(long count, long partition, IDManager.VertexIDType vertexType)
public long getPartitionHashForId(long id)
public long getCanonicalVertexId(long partitionedVertexId)
public boolean isCanonicalVertexId(long partitionVertexId)
public long getPartitionedVertexId(long partitionedVertexId, long otherPartition)
public long[] getPartitionedVertexRepresentatives(long partitionedVertexId)
public long toVertexId(long id)
getVertexCountBound()
.
This method is useful when providing ids during vertex creation via Graph.addVertex(Object...)
.id
- long idfromVertexId(long)
public long fromVertexId(long id)
toVertexId(long)
.id
- JanusGraph vertex id (must be positive)toVertexId(long)
public boolean isPartitionedVertex(Object id)
public long getRelationCountBound()
public long getVertexCountBound()
public static long getTemporaryRelationID(long count)
public static long getTemporaryVertexID(IDManager.VertexIDType type, long count)
public static boolean isTemporary(long id)
public static long getSchemaId(IDManager.VertexIDType type, long count)
public static long stripEntireRelationTypePadding(long id)
public static long stripRelationTypePadding(long id)
public static long addRelationTypePadding(long id)
public static boolean isSystemRelationTypeId(Object id)
public static long getSchemaCountBound()
public final boolean isSchemaVertexId(Object id)
public final boolean isRelationTypeId(Object id)
public final boolean isEdgeLabelId(Object id)
public final boolean isPropertyKeyId(Object id)
public boolean isGenericSchemaVertexId(Object id)
public boolean isVertexLabelVertexId(Object id)
public boolean isUnmodifiableVertex(Object id)
Copyright © 2012–2023. All rights reserved.