Package com.cosylab.epics.caj.impl
Class CachedByteBufferAllocator
- java.lang.Object
-
- com.cosylab.epics.caj.impl.CachedByteBufferAllocator
-
public class CachedByteBufferAllocator extends Object
A buffer allocator which allocates and caches NIO (direct) byte buffers.- Version:
- $id$
- Author:
- Matej Sekoranja
-
-
Field Summary
Fields Modifier and Type Field Description static intbufferSizeThis variable stores the size of the NIO byte buffer that should be allocated according to properties.
-
Constructor Summary
Constructors Constructor Description CachedByteBufferAllocator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBufferget()Get a byte buffer.voidput(ByteBuffer buffer)Return buffer to a cache.
-
-
-
Method Detail
-
get
public ByteBuffer get()
Get a byte buffer.- Returns:
- a byte buffer.
-
put
public void put(ByteBuffer buffer)
Return buffer to a cache.- Parameters:
buffer- buffer to be returned in the cache.
-
-