Package org.apache.cassandra.io.sstable
Class SequenceBasedSSTableId.Builder
java.lang.Object
org.apache.cassandra.io.sstable.SequenceBasedSSTableId.Builder
- All Implemented Interfaces:
SSTableId.Builder<SequenceBasedSSTableId>
- Enclosing class:
- SequenceBasedSSTableId
public static class SequenceBasedSSTableId.Builder
extends Object
implements SSTableId.Builder<SequenceBasedSSTableId>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromBytes(ByteBuffer bytes) Creates an identifier instance from its binary representationfromString(String token) Creates an identifier instance from its string representationGenerates a sequential number to represent an sstables identifier.booleanisUniqueIdentifier(String str) booleanisUniqueIdentifier(ByteBuffer bytes)
-
Field Details
-
instance
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
generator
Generates a sequential number to represent an sstables identifier. The first generated identifier will be greater by one than the largest generation number found across the provided existing identifiers.- Specified by:
generatorin interfaceSSTableId.Builder<SequenceBasedSSTableId>
-
isUniqueIdentifier
- Specified by:
isUniqueIdentifierin interfaceSSTableId.Builder<SequenceBasedSSTableId>
-
isUniqueIdentifier
- Specified by:
isUniqueIdentifierin interfaceSSTableId.Builder<SequenceBasedSSTableId>
-
fromString
Description copied from interface:SSTableId.BuilderCreates an identifier instance from its string representation- Specified by:
fromStringin interfaceSSTableId.Builder<SequenceBasedSSTableId>- Parameters:
token- string representation as returned bySSTableId.toString()- Throws:
IllegalArgumentException- when the provided string is not a valid string representation of the identifier
-
fromBytes
Description copied from interface:SSTableId.BuilderCreates 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.
- Specified by:
fromBytesin interfaceSSTableId.Builder<SequenceBasedSSTableId>- Parameters:
bytes- binary representation as returned bySSTableId.asBytes()- Throws:
IllegalArgumentException- when the provided bytes are not a valid binary representation of the identifier
-