CE-20 moved the map lookup by name from engine to the map code ( but its a bit of a hack and requires implementing properly, but for the moment this demonstrates the API )

This commit is contained in:
Rob Austin
2015-04-09 13:09:25 +01:00
parent e0363defe5
commit 6037bd27e4
8 changed files with 161 additions and 108 deletions
@@ -72,14 +72,9 @@ class StatelessChronicleMap<K, V> implements ChronicleMap<K, V>, Closeable, Clon
private ByteBuffer inBuffer;
private ByteBufferBytes inBytes;
@NotNull
private ReaderWithSize<K> keyReaderWithSize;
@NotNull
private WriterWithSize<K> keyWriterWithSize;
@NotNull
private ReaderWithSize<V> valueReaderWithSize;
@NotNull
private WriterWithSize<V> valueWriterWithSize;
private SocketChannel clientChannel;
@@ -98,15 +93,9 @@ class StatelessChronicleMap<K, V> implements ChronicleMap<K, V>, Closeable, Clon
private final ReentrantLock inBytesLock = new ReentrantLock(true);
private final ReentrantLock outBytesLock = new ReentrantLock();
private final BufferResizer outBufferResizer = new BufferResizer() {
@Override
public Bytes resizeBuffer(int newCapacity) {
return resizeBufferOutBuffer(newCapacity);
private final BufferResizer outBufferResizer = newCapacity -> resizeBufferOutBuffer(newCapacity);
}
};
static enum EventId {
enum EventId {
HEARTBEAT,
STATEFUL_UPDATE,
LONG_SIZE,