Class ExternalizableHelper.Stats

java.lang.Object
com.tangosol.util.ExternalizableHelper.Stats
All Implemented Interfaces:
MultiBufferWriteBuffer.WriteBufferPool
Enclosing class:
ExternalizableHelper

protected static class ExternalizableHelper.Stats extends Object implements MultiBufferWriteBuffer.WriteBufferPool
Serialization statistics for a given user type. Do not document.
  • Constructor Details

    • Stats

      protected Stats()
  • Method Details

    • getMaximumCapacity

      public int getMaximumCapacity()
      Determine the largest amount of aggregate WriteBuffer capacity that this factory can provide.
      Specified by:
      getMaximumCapacity in interface MultiBufferWriteBuffer.WriteBufferPool
      Returns:
      the number of bytes that can be stored in the WriteBuffer objects that may be returned from this factory
    • allocate

      public WriteBuffer allocate(int cbPreviousTotal)
      Allocate a WriteBuffer for use by the MultiBufferWriteBuffer. The MultiBufferWriteBuffer calls this factory method when it exhausts the storage capacity of previously allocated WriteBuffer objects.

      Note that the returned WriteBuffer is expected to be empty, and its capacity is expected to be identical to its maximum capacity, i.e. it is not expected to resize itself, since the purpose of the MultiBufferWriteBuffer is to act as a dynamically-sized WriteBuffer.

      Specified by:
      allocate in interface MultiBufferWriteBuffer.WriteBufferPool
      Parameters:
      cbPreviousTotal - the total number of bytes of capacity of the WriteBuffer objects that the MultiBufferWriteBuffer has thus far consumed
      Returns:
      an empty WriteBuffer suitable for writing to
    • release

      public void release(WriteBuffer buffer)
      Returns a WriteBuffer to the pool.
      Specified by:
      release in interface MultiBufferWriteBuffer.WriteBufferPool
      Parameters:
      buffer - the WriteBuffer that is no longer being used