mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-240 changed to tcpBufferSize()
This commit is contained in:
@@ -1191,7 +1191,7 @@ class StatelessChronicleMap<K, V> implements ChronicleMap<K, V>, Closeable, Clon
|
||||
// if we have other threads waiting to send and the buffer is not full, let the other threads
|
||||
// write to the buffer
|
||||
if (outBytesLock.hasQueuedThreads() &&
|
||||
outBytes.position() + lagestEntrySoFar <= config.packetSize()) {
|
||||
outBytes.position() + lagestEntrySoFar <= config.tcpBufferSize()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1215,7 +1215,7 @@ class StatelessChronicleMap<K, V> implements ChronicleMap<K, V>, Closeable, Clon
|
||||
// if we have queued threads then we don't have to write all the bytes as the other
|
||||
// threads will write the remains bytes.
|
||||
if (outBuffer.remaining() > 0 && outBytesLock.hasQueuedThreads() &&
|
||||
outBuffer.remaining() + lagestEntrySoFar <= config.packetSize()) {
|
||||
outBuffer.remaining() + lagestEntrySoFar <= config.tcpBufferSize()) {
|
||||
|
||||
|
||||
LOG.debug("continuing - without all the data being written to the buffer as " +
|
||||
|
||||
@@ -35,7 +35,7 @@ class StatelessMapConfig<K, V> implements StatelessClientConfig<ChronicleMap<K,
|
||||
private final long timeoutMs;
|
||||
private final String name;
|
||||
|
||||
private int packetSize = 1024 * 64;
|
||||
private int tcpBufferSize = 1024 * 64;
|
||||
|
||||
private final AtomicBoolean used;
|
||||
|
||||
@@ -84,12 +84,12 @@ class StatelessMapConfig<K, V> implements StatelessClientConfig<ChronicleMap<K,
|
||||
}
|
||||
}
|
||||
|
||||
public int packetSize() {
|
||||
return packetSize;
|
||||
public int tcpBufferSize() {
|
||||
return tcpBufferSize;
|
||||
}
|
||||
|
||||
public StatelessMapConfig packetSize(int packetSize) {
|
||||
this.packetSize = packetSize;
|
||||
public StatelessMapConfig tcpBufferSize(int packetSize) {
|
||||
this.tcpBufferSize = packetSize;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user