Package org.apache.cassandra.io.sstable
Interface SSTableId.Builder<T extends SSTableId>
- All Known Implementing Classes:
SequenceBasedSSTableId.Builder,UUIDBasedSSTableId.Builder
- Enclosing interface:
- SSTableId
public static interface SSTableId.Builder<T extends SSTableId>
Builder that can create instances of certain implementation of
SSTableId.-
Method Summary
Modifier and TypeMethodDescriptionfromBytes(ByteBuffer bytes) Creates an identifier instance from its binary representationfromString(String str) Creates an identifier instance from its string representationCreates a new generator of identifiers.booleanisUniqueIdentifier(String str) booleanisUniqueIdentifier(ByteBuffer bytes)
-
Method Details
-
generator
Creates a new generator of identifiers. Each supplied value must be different to all the previously generated values and different to all the provided existing identifiers. -
isUniqueIdentifier
-
isUniqueIdentifier
-
fromString
Creates an identifier instance from its string representation- Parameters:
str- string representation as returned bySSTableId.toString()- Throws:
IllegalArgumentException- when the provided string is not a valid string representation of the identifier
-
fromBytes
Creates an identifier instance from its binary representationThe method expects the identifier is encoded in all remaining bytes of the buffer. The method does not move the pointer of the buffer.
- Parameters:
bytes- binary representation as returned bySSTableId.asBytes()- Throws:
IllegalArgumentException- when the provided bytes are not a valid binary representation of the identifier
-