Package org.burningwave.core.jvm
Class BufferHandler
java.lang.Object
org.burningwave.core.jvm.BufferHandler
- All Implemented Interfaces:
AutoCloseable,Cleanable,Closeable,Component,Identifiable,Properties.Listener,Memorizer
public class BufferHandler extends Object implements Component
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceBufferHandler.Cleanerstatic classBufferHandler.Configurationstatic interfaceBufferHandler.Deallocator -
Constructor Summary
Constructors Constructor Description BufferHandler(Properties config) -
Method Summary
Modifier and Type Method Description ByteBufferallocate(int capacity)ByteBufferallocateDirect(int capacity)ByteBufferallocateInHeap(int capacity)<T extends Buffer>
intcapacity(T buffer)static BufferHandlercreate(Properties config)<T extends Buffer>
booleandestroy(T buffer, boolean force)ByteBufferduplicate(ByteBuffer buffer)ByteBufferensureRemaining(ByteBuffer byteBuffer, int requiredBytes)ByteBufferensureRemaining(ByteBuffer byteBuffer, int requiredBytes, int initialPosition)ByteBufferexpandBuffer(ByteBuffer byteBuffer, int requiredBytes)ByteBufferexpandBuffer(ByteBuffer byteBuffer, int requiredBytes, int initialPosition)<T extends Buffer>
Tflip(T buffer)<T extends Buffer>
longgetAddress(T buffer)<T extends Buffer>
BufferHandler.CleanergetCleaner(T buffer, boolean findInAttachments)<T extends Buffer>
BufferHandler.DeallocatorgetDeallocator(T buffer, boolean findInAttachments)intgetDefaultBufferSize()<T extends Buffer>
intlimit(T buffer)<T extends Buffer>
Tlimit(T buffer, int newLimit)byte[]newByteArray(int size)byte[]newByteArrayWithDefaultSize()ByteBuffernewByteBuffer(int size)ByteBufferOutputStreamnewByteBufferOutputStream(int size)ByteBufferOutputStreamnewByteBufferOutputStreamWithDefaultSize()ByteBuffernewByteBufferWithDefaultSize()<T extends Buffer>
intposition(T buffer)<T extends Buffer>
Tposition(T buffer, int newPosition)<K, V> voidprocessChangeNotification(Properties config, Properties.Event event, K key, V newValue, V previousValue)ByteBufferput(ByteBuffer byteBuffer, byte[] heapBuffer)ByteBufferput(ByteBuffer byteBuffer, byte[] heapBuffer, int bytesToWrite)ByteBufferput(ByteBuffer byteBuffer, byte[] heapBuffer, int bytesToWrite, int initialPosition)<T extends Buffer>
intremaining(T buffer)ByteBuffershareContent(ByteBuffer byteBuffer)byte[]toByteArray(ByteBuffer byteBuffer)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.burningwave.core.Closeable
close, closeResources, closeResources, createCloseResoucesTask, createCloseResoucesTaskMethods inherited from interface org.burningwave.core.Identifiable
getId, getOperationIdMethods inherited from interface org.burningwave.core.Memorizer
getOrCreateTemporaryFolder, getOrCreateTemporaryFolder, getTemporaryFolderPrefixMethods inherited from interface org.burningwave.core.iterable.Properties.Listener
listenTo, unregister
-
Constructor Details
-
BufferHandler
-
-
Method Details
-
processChangeNotification
public <K, V> void processChangeNotification(Properties config, Properties.Event event, K key, V newValue, V previousValue)- Specified by:
processChangeNotificationin interfaceProperties.Listener
-
getDefaultBufferSize
public int getDefaultBufferSize() -
create
-
allocate
-
allocateInHeap
-
allocateDirect
-
duplicate
-
limit
-
position
-
limit
-
position
-
flip
-
capacity
-
remaining
-
put
-
put
-
put
public ByteBuffer put(ByteBuffer byteBuffer, byte[] heapBuffer, int bytesToWrite, int initialPosition) -
toByteArray
-
ensureRemaining
-
ensureRemaining
-
expandBuffer
-
expandBuffer
-
getAddress
-
destroy
-
newByteBufferWithDefaultSize
-
newByteBuffer
-
newByteBufferOutputStreamWithDefaultSize
-
newByteBufferOutputStream
-
newByteArrayWithDefaultSize
public byte[] newByteArrayWithDefaultSize() -
newByteArray
public byte[] newByteArray(int size) -
getCleaner
-
getDeallocator
public <T extends Buffer> BufferHandler.Deallocator getDeallocator(T buffer, boolean findInAttachments)
-