Interface SSTableId.Builder<T extends SSTableId>

    • 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 representation
      T fromString​(java.lang.String str)
      Creates an identifier instance from its string representation
      java.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 by SSTableId.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 representation

        The 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 by SSTableId.asBytes()
        Throws:
        java.lang.IllegalArgumentException - when the provided bytes are not a valid binary representation of the identifier