Package org.apache.cassandra.io.sstable
Class SSTableIdFactory
- java.lang.Object
-
- org.apache.cassandra.io.sstable.SSTableIdFactory
-
public class SSTableIdFactory extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Comparator<SSTableId>
COMPARATOR
Compare sstable identifiers so that UUID based identifier is always greater than sequence based identifierstatic SSTableIdFactory
instance
-
Constructor Summary
Constructors Constructor Description SSTableIdFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SSTableId.Builder<SSTableId>
defaultBuilder()
Returns default identifiers builder.SSTableId
fromBytes(java.nio.ByteBuffer bytes)
Constructs the instance ofSSTableId
from the given bytes.SSTableId
fromString(java.lang.String str)
Constructs the instance ofSSTableId
from the given string representation.
-
-
-
Field Detail
-
instance
public static final SSTableIdFactory instance
-
COMPARATOR
public static final java.util.Comparator<SSTableId> COMPARATOR
Compare sstable identifiers so that UUID based identifier is always greater than sequence based identifier
-
-
Method Detail
-
fromString
public SSTableId fromString(java.lang.String str) throws java.lang.IllegalArgumentException
Constructs the instance ofSSTableId
from 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:
java.lang.IllegalArgumentException
- when the provided string representation does not represent id of any type
-
fromBytes
public SSTableId fromBytes(java.nio.ByteBuffer bytes)
Constructs the instance ofSSTableId
from 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:
java.lang.IllegalArgumentException
- when the provided binary representation does not represent id of any type
-
defaultBuilder
public SSTableId.Builder<SSTableId> defaultBuilder()
Returns default identifiers builder.
-
-