Class ByteArrayWriteBuffer.Allocator

java.lang.Object
com.tangosol.io.ByteArrayWriteBuffer.Allocator
All Implemented Interfaces:
MultiBufferWriteBuffer.WriteBufferPool
Enclosing class:
ByteArrayWriteBuffer

public static class ByteArrayWriteBuffer.Allocator extends Object implements MultiBufferWriteBuffer.WriteBufferPool
Allocator is a WriteBufferPool implementation which allocates a new ByteArrayWriteBuffer on each request to the pool, and does not retain the returned buffer. Essentially it is dummy pool which acts as an allocator.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
    The capacity of the ByteArrayWriteBuffer instances to allocate.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Allocator(int cb)
    Construct an Allocator for ByteArrayWriteBuffers of a given size.
  • Method Summary

    Modifier and Type
    Method
    Description
    allocate(int cbPreviousTotal)
    Allocate a new ByteArrayWriteBuffer.
    int
    Determine the largest amount of aggregate WriteBuffer capacity that this factory can provide.
    void
    Release the supplied buffer into the pool.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • m_cb

      protected int m_cb
      The capacity of the ByteArrayWriteBuffer instances to allocate.
  • Constructor Details

    • Allocator

      public Allocator(int cb)
      Construct an Allocator for ByteArrayWriteBuffers of a given size.
      Parameters:
      cb - the capacity of the ByteArrayWriteBuffer to be allocated
  • Method Details