BitMask Class Reference

List of all members.

Public Static Methods

static final int extractChunkId (final long primaryId)
static final long extractDocumentId (final long primaryId)
static final long extractUniqueId (final long primaryId)
static final long getPrimaryId (final long chunkId, final long signalId, final long uniqueId)
static final int extractTypeId (final long secondaryId)
static final int extractClassId (final long secondaryId)
static final long getSecondaryId (final long typeId, final long classId)
static final int extractLeftAnchor (long anchor)
static final int extractRightAnchor (long anchor)
static final long getAnchor (final long left, final long right)
static void printNice (long id)
static long mergeChunkAndUniqueId (long id, long currentChunk, long uniqueId)
static void printNice (long id, int group, String message)

Public Static Fields

static final int CHUNK_MASK_BITS = 20
static final int CHUNK_MASK_SHIFT = BITS - CHUNK_MASK_BITS
static final long CHUNK_MASK = ((long)Math.pow(2, CHUNK_MASK_BITS)-1) << (BITS - CHUNK_MASK_BITS)
static final int CHUNK_ID_MIN_VALUE = 0
static final int CHUNK_ID_MAX_VALUE = (int) Math.pow(2, CHUNK_MASK_BITS)-1
static final int DOC_MASK_BITS = 22
static final int DOC_MASK_SHIFT = BITS - CHUNK_MASK_BITS - DOC_MASK_BITS
static final long DOC_MASK = ((long)Math.pow(2, DOC_MASK_BITS)-1) << (BITS - CHUNK_MASK_BITS - DOC_MASK_BITS)
static final int DOC_ID_MIN_VALUE = 0
static final int DOC_ID_MAX_VALUE = (int) Math.pow(2, DOC_MASK_BITS)-1
static final int UNIQUE_MASK_BITS = 22
static final int UNIQUE_MASK_SHIFT = BITS - CHUNK_MASK_BITS - DOC_MASK_BITS - UNIQUE_MASK_BITS
static final long UNIQUE_ID_MASK = ((long)Math.pow(2, UNIQUE_MASK_BITS)-1)
static final int UNIQUE_ID_MIN_VALUE = 0
static final int UNIQUE_ID_MAX_VALUE = (int) Math.pow(2, UNIQUE_MASK_BITS)-1
static final int TYPE_MASK_BITS = 32
static final int TYPE_MASK_SHIFT = BITS - TYPE_MASK_BITS
static final long TYPE_MASK = ((long)Math.pow(2, TYPE_MASK_BITS)-1) << (BITS- TYPE_MASK_BITS)
static final int TYPE_ID_MIN_VALUE = 0
static final int TYPE_ID_MAX_VALUE = (int) Math.pow(2, TYPE_MASK_BITS)-1
static final int CLASS_MASK_BITS = 22
static final int CLASS_MASK_SHIFT = BITS - TYPE_MASK_BITS - CLASS_MASK_BITS
static final long CLASS_MASK = ((long)Math.pow(2, CLASS_MASK_BITS)-1) << (BITS - TYPE_MASK_BITS - CLASS_MASK_BITS)
static final int CLASS_ID_MIN_VALUE = 0
static final int CLASS_ID_MAX_VALUE = (int) Math.pow(2, CLASS_MASK_BITS)-1
static final int LEFT_ANCHOR_MASK_BITS = 32
static final int LEFT_ANCHOR_MASK_SHIFT = BITS - LEFT_ANCHOR_MASK_BITS
static final long LEFT_ANCHOR_MASK = ((long) Math.pow(2, LEFT_ANCHOR_MASK_BITS))-1 << LEFT_ANCHOR_MASK_SHIFT
static final int LEFT_ANCHOR_MASK_MIN_VALUE = 0
static final int LEFT_ANCHOR_MASK_MAX_VALUE = (int) Math.pow(2, LEFT_ANCHOR_MASK_BITS)-1
static final int RIGHT_ANCHOR_MASK_BITS = 32
static final int RIGHT_ANCHOR_MASK_SHIFT = BITS - LEFT_ANCHOR_MASK_BITS - RIGHT_ANCHOR_MASK_BITS
static final long RIGHT_ANCHOR_MASK = ((long) Math.pow(2, RIGHT_ANCHOR_MASK_BITS))-1
static final int RIGHT_ANCHOR_MASK_MIN_VALUE = 0
static final int RIGHT_ANCHOR_MASK_MAX_VALUE = (int) Math.pow(2, RIGHT_ANCHOR_MASK_BITS)-1

Method Details

static final int extractChunkId ( final long  primaryId) [static]
static final int extractClassId ( final long  secondaryId) [static]
static final long extractDocumentId ( final long  primaryId) [static]
static final int extractLeftAnchor ( long  anchor) [static]
static final int extractRightAnchor ( long  anchor) [static]
static final int extractTypeId ( final long  secondaryId) [static]
static final long extractUniqueId ( final long  primaryId) [static]
static final long getAnchor ( final long  left,
final long  right 
) [static]
static final long getPrimaryId ( final long  chunkId,
final long  signalId,
final long  uniqueId 
) [static]
static final long getSecondaryId ( final long  typeId,
final long  classId 
) [static]
static long mergeChunkAndUniqueId ( long  id,
long  currentChunk,
long  uniqueId 
) [static]
static void printNice ( long  id,
int  group,
String  message 
) [static]
static void printNice ( long  id) [static]

Field Details

final int CHUNK_ID_MAX_VALUE = (int) Math.pow(2, CHUNK_MASK_BITS)-1 [static]
final int CHUNK_ID_MIN_VALUE = 0 [static]
final long CHUNK_MASK = ((long)Math.pow(2, CHUNK_MASK_BITS)-1) << (BITS - CHUNK_MASK_BITS) [static]
final int CHUNK_MASK_BITS = 20 [static]
final int CHUNK_MASK_SHIFT = BITS - CHUNK_MASK_BITS [static]
final int CLASS_ID_MAX_VALUE = (int) Math.pow(2, CLASS_MASK_BITS)-1 [static]
final int CLASS_ID_MIN_VALUE = 0 [static]
final long CLASS_MASK = ((long)Math.pow(2, CLASS_MASK_BITS)-1) << (BITS - TYPE_MASK_BITS - CLASS_MASK_BITS) [static]
final int CLASS_MASK_BITS = 22 [static]
final int CLASS_MASK_SHIFT = BITS - TYPE_MASK_BITS - CLASS_MASK_BITS [static]
final int DOC_ID_MAX_VALUE = (int) Math.pow(2, DOC_MASK_BITS)-1 [static]
final int DOC_ID_MIN_VALUE = 0 [static]
final long DOC_MASK = ((long)Math.pow(2, DOC_MASK_BITS)-1) << (BITS - CHUNK_MASK_BITS - DOC_MASK_BITS) [static]
final int DOC_MASK_BITS = 22 [static]
final int DOC_MASK_SHIFT = BITS - CHUNK_MASK_BITS - DOC_MASK_BITS [static]
final long LEFT_ANCHOR_MASK = ((long) Math.pow(2, LEFT_ANCHOR_MASK_BITS))-1 << LEFT_ANCHOR_MASK_SHIFT [static]
final int LEFT_ANCHOR_MASK_BITS = 32 [static]

Left anchor mask: 32 bit: 4.294.967.295

final int LEFT_ANCHOR_MASK_MAX_VALUE = (int) Math.pow(2, LEFT_ANCHOR_MASK_BITS)-1 [static]
final int LEFT_ANCHOR_MASK_MIN_VALUE = 0 [static]
final int LEFT_ANCHOR_MASK_SHIFT = BITS - LEFT_ANCHOR_MASK_BITS [static]
final long RIGHT_ANCHOR_MASK = ((long) Math.pow(2, RIGHT_ANCHOR_MASK_BITS))-1 [static]
final int RIGHT_ANCHOR_MASK_BITS = 32 [static]

Right anchor mask: 32 bit: 4.294.967.295

final int RIGHT_ANCHOR_MASK_MAX_VALUE = (int) Math.pow(2, RIGHT_ANCHOR_MASK_BITS)-1 [static]
final int RIGHT_ANCHOR_MASK_MIN_VALUE = 0 [static]
final int TYPE_ID_MAX_VALUE = (int) Math.pow(2, TYPE_MASK_BITS)-1 [static]
final int TYPE_ID_MIN_VALUE = 0 [static]
final long TYPE_MASK = ((long)Math.pow(2, TYPE_MASK_BITS)-1) << (BITS- TYPE_MASK_BITS) [static]
final int TYPE_MASK_BITS = 32 [static]
final int TYPE_MASK_SHIFT = BITS - TYPE_MASK_BITS [static]
final long UNIQUE_ID_MASK = ((long)Math.pow(2, UNIQUE_MASK_BITS)-1) [static]
final int UNIQUE_ID_MAX_VALUE = (int) Math.pow(2, UNIQUE_MASK_BITS)-1 [static]
final int UNIQUE_ID_MIN_VALUE = 0 [static]
final int UNIQUE_MASK_BITS = 22 [static]