migrating the code towards the https://github.com/OpenHFT/RFC/blob/master/Chronicle/Map/Remote/Chronicle-Map-0.1.md specification - still work in progress - DON'T REFACTOR

This commit is contained in:
Rob Austin
2015-03-31 18:19:10 +01:00
parent 75ecfb6c7e
commit 92741c26fa
4 changed files with 149 additions and 31 deletions
@@ -204,6 +204,11 @@ class MapWireHandler<K, V> implements WireHandler, Consumer<WireHandlers> {
timestamp = inWire.read(timeStamp).int64();
channelId = inWire.read(Fields.channelId).int16();
final Bytes<?> bytes1 = inWire.bytes();
final int body = bytes1.readVolatileInt();
assert Wires.isData(body);
final StringBuilder methodName = Wires.acquireStringBuilder();
inWire.read(Fields.methodName).text(methodName);
@@ -252,8 +257,10 @@ class MapWireHandler<K, V> implements WireHandler, Consumer<WireHandlers> {
return;
}
outWire.writeDocument(true, wire -> outWire.write(Fields.tid).int64(tid));
// write the transaction id
outWire.write(Fields.tid).int64(tid);
if (createChannel.contentEquals(methodName)) {