From d627b2781b5b702dbadd4751cfd47b004fe7e815 Mon Sep 17 00:00:00 2001 From: Rob Austin Date: Mon, 6 Apr 2015 18:54:40 +0100 Subject: [PATCH] CE-20 changed put to getAndPut --- .../chronicle/map/ClientWiredStatelessChronicleMap.java | 4 ++-- .../java/net/openhft/chronicle/map/MapWireHandler.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/openhft/chronicle/map/ClientWiredStatelessChronicleMap.java b/src/main/java/net/openhft/chronicle/map/ClientWiredStatelessChronicleMap.java index 41d302480..39516e456 100644 --- a/src/main/java/net/openhft/chronicle/map/ClientWiredStatelessChronicleMap.java +++ b/src/main/java/net/openhft/chronicle/map/ClientWiredStatelessChronicleMap.java @@ -344,7 +344,7 @@ class ClientWiredStatelessChronicleMap public V put(K key, V value) { if (key == null || value == null) throw new NullPointerException(); - return proxyReturnTypedObject(putReturnsNull ? putWithoutAcc : put, vClass, key, + return proxyReturnTypedObject(putReturnsNull ? put : getAndPut, vClass, key, value); } @@ -989,7 +989,7 @@ class ClientWiredStatelessChronicleMap switch (methodName) { case putAllWithoutAcc: - case putWithoutAcc: + case put: case removeWithoutAcc: return true; default: diff --git a/src/main/java/net/openhft/chronicle/map/MapWireHandler.java b/src/main/java/net/openhft/chronicle/map/MapWireHandler.java index 5676e2144..263e637ff 100644 --- a/src/main/java/net/openhft/chronicle/map/MapWireHandler.java +++ b/src/main/java/net/openhft/chronicle/map/MapWireHandler.java @@ -229,7 +229,7 @@ class MapWireHandler implements WireHandler, Consumer { try { - if (putWithoutAcc.contentEquals(eventName)) { + if (put.contentEquals(eventName)) { valueIn.marshallable(wire -> { @@ -323,11 +323,11 @@ class MapWireHandler implements WireHandler, Consumer { return; } - if (put.contentEquals(eventName)) { + if (getAndPut.contentEquals(eventName)) { valueIn.marshallable(wire -> { - final Params[] params = put.params; + final Params[] params = getAndPut.params; final byte[] key1 = wire.read(params[0]).bytes(); final byte[] value1 = wire.read(params[1]).bytes(); @@ -840,8 +840,8 @@ class MapWireHandler implements WireHandler, Consumer { containsKey(key), containsValue(value), get(key), + getAndPut(key, value), put(key, value), - putWithoutAcc(key, value), remove(key), removeWithoutAcc(key), clear,