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 ofSSTableId
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
fromBytes(java.nio.ByteBuffer bytes)
Creates an identifier instance from its binary representationT
fromString(java.lang.String str)
Creates an identifier instance from its string representationjava.util.function.Supplier<T>
generator(java.util.stream.Stream<SSTableId> existingIdentifiers)
Creates a new generator of identifiers.boolean
isUniqueIdentifier(java.lang.String str)
boolean
isUniqueIdentifier(java.nio.ByteBuffer bytes)
-
-
-
Method Detail
-
generator
java.util.function.Supplier<T> generator(java.util.stream.Stream<SSTableId> existingIdentifiers)
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
boolean isUniqueIdentifier(java.lang.String str)
-
isUniqueIdentifier
boolean isUniqueIdentifier(java.nio.ByteBuffer bytes)
-
fromString
T fromString(java.lang.String str) throws java.lang.IllegalArgumentException
Creates an identifier instance from its string representation- Parameters:
str
- string representation as returned bySSTableId.toString()
- Throws:
java.lang.IllegalArgumentException
- when the provided string is not a valid string representation of the identifier
-
fromBytes
T fromBytes(java.nio.ByteBuffer bytes) throws java.lang.IllegalArgumentException
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:
java.lang.IllegalArgumentException
- when the provided bytes are not a valid binary representation of the identifier
-
-