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.Builder
instance
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UUIDBasedSSTableId
fromBytes(java.nio.ByteBuffer bytes)
Creates an identifier instance from its binary representationUUIDBasedSSTableId
fromString(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.boolean
isUniqueIdentifier(java.lang.String str)
boolean
isUniqueIdentifier(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:
generator
in interfaceSSTableId.Builder<UUIDBasedSSTableId>
- Parameters:
existingIdentifiers
- not used by UUID based generator
-
isUniqueIdentifier
public boolean isUniqueIdentifier(java.lang.String str)
- Specified by:
isUniqueIdentifier
in interfaceSSTableId.Builder<UUIDBasedSSTableId>
-
isUniqueIdentifier
public boolean isUniqueIdentifier(java.nio.ByteBuffer bytes)
- Specified by:
isUniqueIdentifier
in interfaceSSTableId.Builder<UUIDBasedSSTableId>
-
fromString
public UUIDBasedSSTableId fromString(@Nonnull java.lang.String s) throws java.lang.IllegalArgumentException
Description copied from interface:SSTableId.Builder
Creates an identifier instance from its string representation- Specified by:
fromString
in 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.Builder
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.
- Specified by:
fromBytes
in 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
-
-