Class ByteBufferRedoLogFileStorage.ByteArrayResource

java.lang.Object
com.j_spaces.kernel.pool.Resource
com.gigaspaces.internal.server.space.redolog.storage.bytebuffer.ByteBufferRedoLogFileStorage.ByteArrayResource
All Implemented Interfaces:
IResource
Enclosing class:
ByteBufferRedoLogFileStorage<T extends IReplicationOrderedPacket>

public class ByteBufferRedoLogFileStorage.ByteArrayResource extends Resource
A resource for byte array, ensure capacity must be called each time this resource is taken
Since:
7.1
Author:
eitany
  • Constructor Details

    • ByteArrayResource

      public ByteArrayResource(int length)
  • Method Details

    • ensureCapacity

      public void ensureCapacity(int length)
    • clear

      public void clear()
      Description copied from interface: IResource
      Cleans the resource of its contents so it can be returned to the pool.

      You may use the IResource.isFromPool() indication to decide of a special action before returning a resource to the pool, or discard any actions on resources not returning to the pool.

      Specified by:
      clear in interface IResource
      Specified by:
      clear in class Resource
      See Also:
    • array

      public byte[] array()
      Must be called first when the resource is acquired only after ensureCapacity was called