Package org.apache.cassandra.io.sstable
Class SSTableIdFactory
java.lang.Object
org.apache.cassandra.io.sstable.SSTableIdFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Comparator<SSTableId>Compare sstable identifiers so that UUID based identifier is always greater than sequence based identifierstatic final SSTableIdFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns default identifiers builder.fromBytes(ByteBuffer bytes) Constructs the instance ofSSTableIdfrom the given bytes.fromString(String str) Constructs the instance ofSSTableIdfrom the given string representation.
-
Field Details
-
instance
-
COMPARATOR
Compare sstable identifiers so that UUID based identifier is always greater than sequence based identifier
-
-
Constructor Details
-
SSTableIdFactory
public SSTableIdFactory()
-
-
Method Details
-
fromString
Constructs the instance ofSSTableIdfrom the given string representation. It finds the right builder by verifying whether the given string is the representation of the related identifier type usingSSTableId.Builder.isUniqueIdentifier(String)method.- Throws:
IllegalArgumentException- when the provided string representation does not represent id of any type
-
fromBytes
Constructs the instance ofSSTableIdfrom the given bytes. It finds the right builder by verifying whether the given buffer is the representation of the related identifier type usingSSTableId.Builder.isUniqueIdentifier(ByteBuffer)method. The method expects the identifier is encoded in all remaining bytes of the buffer. The method does not move the pointer of the buffer.- Throws:
IllegalArgumentException- when the provided binary representation does not represent id of any type
-
defaultBuilder
Returns default identifiers builder.
-