Package com.tangosol.util
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionallocate
(int cbPreviousTotal) Allocate a WriteBuffer for use by the MultiBufferWriteBuffer.int
Determine the largest amount of aggregate WriteBuffer capacity that this factory can provide.void
release
(WriteBuffer buffer) Returns a WriteBuffer to the pool.
-
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 interfaceMultiBufferWriteBuffer.WriteBufferPool
- Returns:
- the number of bytes that can be stored in the WriteBuffer objects that may be returned from this factory
-
allocate
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 interfaceMultiBufferWriteBuffer.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
Returns a WriteBuffer to the pool.- Specified by:
release
in interfaceMultiBufferWriteBuffer.WriteBufferPool
- Parameters:
buffer
- the WriteBuffer that is no longer being used
-