mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Removed ChronicleHash.context() method and changed acquireContext() return type from deprecated MapKeyContext to Closeable
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user