mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-167 added timout time
This commit is contained in:
@@ -111,8 +111,10 @@ class StatelessChronicleMap<K, V> implements ChronicleMap<K, V>, Closeable, Clos
|
||||
ByteBuffer buffer = out.buffer().slice();
|
||||
buffer.position(0);
|
||||
buffer.limit(1);
|
||||
long timeoutTime = System.currentTimeMillis() + builder.timeoutMs();
|
||||
while (buffer.hasRemaining()) {
|
||||
clientChannel.write(buffer);
|
||||
checkTimeout(timeoutTime);
|
||||
}
|
||||
|
||||
|
||||
@@ -123,6 +125,7 @@ class StatelessChronicleMap<K, V> implements ChronicleMap<K, V>, Closeable, Clos
|
||||
|
||||
while (in.buffer().position() <= 0) {
|
||||
clientChannel.read(in.buffer());
|
||||
checkTimeout(timeoutTime);
|
||||
}
|
||||
|
||||
in.limit(in.buffer().position());
|
||||
|
||||
Reference in New Issue
Block a user