Removed ChronicleHash.context() method and changed acquireContext() return type from deprecated MapKeyContext to Closeable

This commit is contained in:
leventov
2015-07-24 03:43:50 +03:00
parent 5b23bd6f45
commit 912a3cc2fc
27 changed files with 689 additions and 667 deletions
@@ -1,11 +1,10 @@
package eg;
import net.openhft.chronicle.core.io.Closeable;
import net.openhft.chronicle.hash.replication.TcpTransportAndNetworkConfig;
import net.openhft.chronicle.map.ChronicleMap;
import net.openhft.chronicle.map.ChronicleMapBuilder;
import net.openhft.chronicle.map.MapKeyContext;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import java.net.InetSocketAddress;
@@ -51,8 +50,7 @@ public class TestNesterInterfaceMarshal {
TestInstrumentVOInterface intrumentVOInterface = map.newValueInstance();
try (MapKeyContext<?, TestInstrumentVOInterface> wc = map.acquireContext
("KEY1", intrumentVOInterface)) {
try (Closeable c = map.acquireContext("KEY1", intrumentVOInterface)) {
intrumentVOInterface.setSymbol("Flyer");
intrumentVOInterface.setCurrencyCode("USA");
intrumentVOInterface.setSizeOfInstrumentIDArray(2);