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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic classstatic interface -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallocate(int capacity) allocateDirect(int capacity) allocateInHeap(int capacity) <T extends Buffer>
intcapacity(T buffer) static BufferHandler<T extends Buffer>
booleandestroy(T buffer, boolean force) duplicate(ByteBuffer buffer) ensureRemaining(ByteBuffer byteBuffer, int requiredBytes) ensureRemaining(ByteBuffer byteBuffer, int requiredBytes, int initialPosition) expandBuffer(ByteBuffer byteBuffer, int requiredBytes) expandBuffer(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) int<T extends Buffer>
intlimit(T buffer) <T extends Buffer>
Tlimit(T buffer, int newLimit) byte[]newByteArray(int size) byte[]newByteBuffer(int size) newByteBufferOutputStream(int size) <T extends Buffer>
intposition(T buffer) <T extends Buffer>
Tposition(T buffer, int newPosition) <K,V> void processChangeNotification(Properties config, Properties.Event event, K key, V newValue, V previousValue) put(ByteBuffer byteBuffer, byte[] heapBuffer) put(ByteBuffer byteBuffer, byte[] heapBuffer, int bytesToWrite) put(ByteBuffer byteBuffer, byte[] heapBuffer, int bytesToWrite, int initialPosition) <T extends Buffer>
intremaining(T buffer) shareContent(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.Cleanable
clear, clearInBackgroundMethods 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
checkAndListenTo, checkAndUnregister, 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)
-