Class ExternalizableHelper.Stats

    • Constructor Detail

      • Stats

        protected Stats()
    • Method Detail

      • 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