public class PartitionLocator extends Object implements IPartitionMetadata, Externalizable
MetadataIndex.
Note: The ISeparatorKeys.getLeftSeparatorKey() is always equal to the
key under which the PartitionLocator is stored in the metadata index.
Likewise, the ISeparatorKeys.getRightSeparatorKey() is always equal
to the key under which the successor of the index entry is stored (or
null iff there is no successor). However, the left and right
separator keys are stored explicitly in the values of the metadata index
because it greatly simplifies client operations. While the left
separator key is directly obtainable from the key under which the locator was
stored, the right separator key is much more difficult to obtain in the
various contexts within which the ClientIndexView requires that
information.
| Constructor and Description |
|---|
PartitionLocator()
De-serialization constructor.
|
PartitionLocator(int partitionId,
UUID logicalDataServiceUUID,
byte[] leftSeparatorKey,
byte[] rightSeparatorKey) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
UUID |
getDataServiceUUID()
The UUID of the (logical) data service on which the index partition
resides.
|
byte[] |
getLeftSeparatorKey()
The separator key that defines the left edge of that index partition
(always defined) - this is the first key that can enter the index
partition.
|
int |
getPartitionId()
The unique partition identifier.
|
byte[] |
getRightSeparatorKey()
The separator key that defines the right edge of that index partition or
null iff the index partition does not have a right sibling
(a null has the semantics of having no upper bound). |
int |
hashCode()
|
void |
readExternal(ObjectInput in) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
public PartitionLocator()
public PartitionLocator(int partitionId,
UUID logicalDataServiceUUID,
byte[] leftSeparatorKey,
byte[] rightSeparatorKey)
partitionId - The unique partition identifier assigned by the
MetadataIndex.logicalDataServiceUUID - The ordered array of data service identifiers on which data
for this partition will be written and from which data for
this partition may be read.leftSeparatorKey - The separator key that defines the left edge of that index
partition (always defined) - this is the first key that can
enter the index partition. The left-most separator key for a
scale-out index is always an empty byte[] since
that is the smallest key that may be defined.rightSeparatorKey - The separator key that defines the right edge of that index
partition or null iff the index partition does
not have a right sibling (a null has the
semantics of having no upper bound).public final int getPartitionId()
IPartitionMetadatagetPartitionId in interface IPartitionMetadatapublic UUID getDataServiceUUID()
public final byte[] getLeftSeparatorKey()
ISeparatorKeysbyte[] since that is the smallest key that may be
defined.getLeftSeparatorKey in interface ISeparatorKeyspublic final byte[] getRightSeparatorKey()
ISeparatorKeysnull iff the index partition does not have a right sibling
(a null has the semantics of having no upper bound).getRightSeparatorKey in interface ISeparatorKeyspublic final int hashCode()
IPartitionMetadatahashCode in interface IPartitionMetadatahashCode in class Objectpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.