Package org.apache.nifi.remote.io.socket
Class BufferStateManager
java.lang.Object
org.apache.nifi.remote.io.socket.BufferStateManager
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ByteBuffer
private BufferStateManager.Direction
private static final org.slf4j.Logger
-
Constructor Summary
ConstructorsConstructorDescriptionBufferStateManager
(ByteBuffer buffer) BufferStateManager
(ByteBuffer buffer, BufferStateManager.Direction direction) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears the contents of the buffer and sets direction to WRITEvoid
compact()
void
ensureSize
(int requiredSize) Ensures that the buffer is at least as big as the size specified, resizing the buffer if necessary.prepareForRead
(int requiredSize) prepareForWrite
(int requiredSize)
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
buffer
-
direction
-
-
Constructor Details
-
BufferStateManager
-
BufferStateManager
-
-
Method Details
-
ensureSize
public void ensureSize(int requiredSize) Ensures that the buffer is at least as big as the size specified, resizing the buffer if necessary. This operation MAY change the direction of the buffer.- Parameters:
requiredSize
- the desired size of the buffer
-
prepareForWrite
-
prepareForRead
-
clear
public void clear()Clears the contents of the buffer and sets direction to WRITE -
compact
public void compact()
-