public final class ResponseChunk
extends java.lang.Object
| Constructor | Description |
|---|---|
ResponseChunk(boolean flush,
java.nio.ByteBuffer data) |
Creates new instance.
|
ResponseChunk(boolean flush,
java.nio.ByteBuffer data,
java.lang.Runnable releaseCallback) |
Creates new instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.nio.ByteBuffer |
data() |
Returns a data.
|
boolean |
flush() |
Returns
true if all caches are requested to flush when this chunk is written. |
void |
release() |
Call when data were consumed and data buffer can be reused.
|
public ResponseChunk(boolean flush,
java.nio.ByteBuffer data,
java.lang.Runnable releaseCallback)
flush - a signal that chunk should be written and flushed from any cache if possibledata - a data chunk. Should not be reused until releaseCallback is usedreleaseCallback - a callback which is called when this chunk is completely processed and instance is free for reusepublic ResponseChunk(boolean flush,
java.nio.ByteBuffer data)
flush - a signal that chunk should be written and flushed from any cache if possibledata - a data chunk. Should not be reused until releaseCallback is usedpublic void release()
public java.nio.ByteBuffer data()
public boolean flush()
true if all caches are requested to flush when this chunk is written.true if it is requested to flush all caches after this chunkCopyright © 2018 Oracle Corporation. All rights reserved.