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>
A resource for byte array, ensure capacity must be called each time this resource is taken
- Since:
- 7.1
- Author:
- eitany
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]array()Must be called first when the resource is acquired only after ensureCapacity was calledvoidclear()Cleans the resource of its contents so it can be returned to the pool.voidensureCapacity(int length) Methods inherited from class com.j_spaces.kernel.pool.Resource
acquire, isAcquired, isFromPool, release, setAcquired, setFromPool
-
Constructor Details
-
ByteArrayResource
public ByteArrayResource(int length)
-
-
Method Details
-
ensureCapacity
public void ensureCapacity(int length) -
clear
public void clear()Description copied from interface:IResourceCleans 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. -
array
public byte[] array()Must be called first when the resource is acquired only after ensureCapacity was called
-