use of voldemort.common.nio.ByteBufferContainer in project voldemort by voldemort.
the class AsyncRequestHandler method initializeStreams.
@Override
protected void initializeStreams(int socketBufferSize, CommBufferSizeStats commBufferStats) {
ByteBufferContainer inputBufferContainer, outputBufferContainer;
inputBufferContainer = new ByteBufferContainer(socketBufferSize, resizeThreshold, commBufferStats.getCommReadBufferSizeTracker());
if (requestHandlerFactory.shareReadWriteBuffer()) {
outputBufferContainer = inputBufferContainer;
} else {
outputBufferContainer = new ByteBufferContainer(socketBufferSize, resizeThreshold, commBufferStats.getCommWriteBufferSizeTracker());
}
this.inputStream = new ByteBufferBackedInputStream(inputBufferContainer);
this.outputStream = new ByteBufferBackedOutputStream(outputBufferContainer);
}
use of voldemort.common.nio.ByteBufferContainer in project voldemort by voldemort.
the class ClientRequestExecutor method initializeStreams.
@Override
protected void initializeStreams(int socketBufferSize, CommBufferSizeStats commBufferStats) {
bufferContainer = new ByteBufferContainer(socketBufferSize, resizeThreshold, commBufferStats.getCommReadBufferSizeTracker());
this.inputStream = new ByteBufferBackedInputStream(bufferContainer);
this.outputStream = new ByteBufferBackedOutputStream(bufferContainer);
}
Aggregations