Package org.apache.cassandra.io.sstable
Class UUIDBasedSSTableId.Builder
- java.lang.Object
-
- org.apache.cassandra.io.sstable.UUIDBasedSSTableId.Builder
-
- All Implemented Interfaces:
SSTableId.Builder<UUIDBasedSSTableId>
- Enclosing class:
- UUIDBasedSSTableId
public static class UUIDBasedSSTableId.Builder extends java.lang.Object implements SSTableId.Builder<UUIDBasedSSTableId>
-
-
Field Summary
Fields Modifier and Type Field Description static UUIDBasedSSTableId.Builderinstance
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UUIDBasedSSTableIdfromBytes(java.nio.ByteBuffer bytes)Creates an identifier instance from its binary representationUUIDBasedSSTableIdfromString(java.lang.String s)Creates an identifier instance from its string representationjava.util.function.Supplier<UUIDBasedSSTableId>generator(java.util.stream.Stream<SSTableId> existingIdentifiers)Creates a new UUID based identifiers generator.booleanisUniqueIdentifier(java.lang.String str)booleanisUniqueIdentifier(java.nio.ByteBuffer bytes)
-
-
-
Field Detail
-
instance
public static final UUIDBasedSSTableId.Builder instance
-
-
Method Detail
-
generator
public java.util.function.Supplier<UUIDBasedSSTableId> generator(java.util.stream.Stream<SSTableId> existingIdentifiers)
Creates a new UUID based identifiers generator.- Specified by:
generatorin interfaceSSTableId.Builder<UUIDBasedSSTableId>- Parameters:
existingIdentifiers- not used by UUID based generator
-
isUniqueIdentifier
public boolean isUniqueIdentifier(java.lang.String str)
- Specified by:
isUniqueIdentifierin interfaceSSTableId.Builder<UUIDBasedSSTableId>
-
isUniqueIdentifier
public boolean isUniqueIdentifier(java.nio.ByteBuffer bytes)
- Specified by:
isUniqueIdentifierin interfaceSSTableId.Builder<UUIDBasedSSTableId>
-
fromString
public UUIDBasedSSTableId fromString(@Nonnull java.lang.String s) throws java.lang.IllegalArgumentException
Description copied from interface:SSTableId.BuilderCreates an identifier instance from its string representation- Specified by:
fromStringin interfaceSSTableId.Builder<UUIDBasedSSTableId>- Parameters:
s- string representation as returned bySSTableId.toString()- Throws:
java.lang.IllegalArgumentException- when the provided string is not a valid string representation of the identifier
-
fromBytes
public UUIDBasedSSTableId fromBytes(@Nonnull java.nio.ByteBuffer bytes) throws java.lang.IllegalArgumentException
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<UUIDBasedSSTableId>- 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
-
-