ContextAllocator (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.utils.memory

## Class ContextAllocator

- java.lang.Object
- - org.apache.cassandra.utils.memory.AbstractAllocator
  - - org.apache.cassandra.utils.memory.ContextAllocator

-     public final class ContextAllocator
      extends AbstractAllocator

  Wraps calls to a PoolAllocator with the provided writeOp. Also doubles as a Function that clones Cells using itself

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ContextAllocator(OpOrder.Group opGroup, MemtableBufferAllocator allocator)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.nio.ByteBuffer` | `allocate(int size)`
    `java.nio.ByteBuffer` | `clone(java.nio.ByteBuffer buffer)` Allocate a slice of the given length.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ContextAllocator

          public ContextAllocator(OpOrder.Group opGroup,
                          MemtableBufferAllocator allocator)

  - ### Method Detail

    - #### clone

          public java.nio.ByteBuffer clone(java.nio.ByteBuffer buffer)

      Description copied from class: `AbstractAllocator`
      Allocate a slice of the given length.
      Overrides:
        `clone` in class `AbstractAllocator`

    - #### allocate

          public java.nio.ByteBuffer allocate(int size)

      Specified by:
        `allocate` in class `AbstractAllocator`

Copyright © 2014 The Apache Software Foundation