public static class UUIDBasedSSTableId.Builder extends java.lang.Object implements SSTableId.Builder<UUIDBasedSSTableId>
Modifier and Type | Field and Description |
---|---|
static UUIDBasedSSTableId.Builder |
instance |
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
UUIDBasedSSTableId |
fromBytes(java.nio.ByteBuffer bytes)
Creates an identifier instance from its binary representation
|
UUIDBasedSSTableId |
fromString(java.lang.String s)
Creates an identifier instance from its string representation
|
java.util.function.Supplier<UUIDBasedSSTableId> |
generator(java.util.stream.Stream<SSTableId> existingIdentifiers)
Creates a new UUID based identifiers generator.
|
boolean |
isUniqueIdentifier(java.nio.ByteBuffer bytes) |
boolean |
isUniqueIdentifier(java.lang.String str) |
public static final UUIDBasedSSTableId.Builder instance
public java.util.function.Supplier<UUIDBasedSSTableId> generator(java.util.stream.Stream<SSTableId> existingIdentifiers)
generator
in interface SSTableId.Builder<UUIDBasedSSTableId>
existingIdentifiers
- not used by UUID based generatorpublic boolean isUniqueIdentifier(java.lang.String str)
isUniqueIdentifier
in interface SSTableId.Builder<UUIDBasedSSTableId>
public boolean isUniqueIdentifier(java.nio.ByteBuffer bytes)
isUniqueIdentifier
in interface SSTableId.Builder<UUIDBasedSSTableId>
public UUIDBasedSSTableId fromString(@Nonnull java.lang.String s) throws java.lang.IllegalArgumentException
SSTableId.Builder
fromString
in interface SSTableId.Builder<UUIDBasedSSTableId>
s
- string representation as returned by SSTableId.toString()
java.lang.IllegalArgumentException
- when the provided string is not a valid string representation of the identifierpublic UUIDBasedSSTableId fromBytes(@Nonnull java.nio.ByteBuffer bytes) throws java.lang.IllegalArgumentException
SSTableId.Builder
The method expects the identifier is encoded in all remaining bytes of the buffer. The method does not move the pointer of the buffer.
fromBytes
in interface SSTableId.Builder<UUIDBasedSSTableId>
bytes
- binary representation as returned by SSTableId.asBytes()
java.lang.IllegalArgumentException
- when the provided bytes are not a valid binary representation of the identifierCopyright © 2009-2022 The Apache Software Foundation