Class ByteBufferCloner

java.lang.Object
org.apache.cassandra.utils.memory.ByteBufferCloner
All Implemented Interfaces:
Cloner
Direct Known Subclasses:
HeapCloner

public abstract class ByteBufferCloner extends Object implements Cloner
Cloner class that can be use to clone partition elements using on-heap or off-heap buffers.
  • Constructor Details

    • ByteBufferCloner

      public ByteBufferCloner()
  • Method Details

    • allocate

      public abstract ByteBuffer allocate(int size)
      Allocate a slice of the given length.
    • clone

      public DecoratedKey clone(DecoratedKey key)
      Description copied from interface: Cloner
      Clones the specified key.
      Specified by:
      clone in interface Cloner
      Parameters:
      key - the key to clone
      Returns:
      the cloned key
    • clone

      public Clustering<?> clone(Clustering<?> clustering)
      Description copied from interface: Cloner
      Clones the specified clustering.
      Specified by:
      clone in interface Cloner
      Parameters:
      clustering - the clustering to clone
      Returns:
      the cloned clustering
    • clone

      public Cell<?> clone(Cell<?> cell)
      Description copied from interface: Cloner
      Clones the specified cell.
      Specified by:
      clone in interface Cloner
      Parameters:
      cell - the cell to clone
      Returns:
      the cloned cell
    • clone

      public final ByteBuffer clone(ByteBuffer buffer)
    • clone

      public final ByteBuffer clone(byte[] bytes)
    • clone

      public final <V> ByteBuffer clone(V value, ValueAccessor<V> accessor)