Use ChronicleMapBuilder to build all ChronicleMap

This commit is contained in:
Peter Lawrey
2015-01-15 17:35:44 +00:00
parent a7b3f03fe2
commit 8a4ad9ade2
9 changed files with 38 additions and 31 deletions
+4 -5
View File
@@ -3,7 +3,6 @@ package eg;
import net.openhft.chronicle.hash.replication.TcpTransportAndNetworkConfig;
import net.openhft.chronicle.map.ChronicleMap;
import net.openhft.chronicle.map.ChronicleMapBuilder;
import net.openhft.chronicle.map.ChronicleMapStatelessClientBuilder;
import java.io.Closeable;
import java.io.File;
@@ -102,8 +101,8 @@ public class BGChronicleTest {
public Void call() throws IOException {
InetSocketAddress serverAddress =
REPLICAS > 1 && clientId % 2 == 0 ? remoteAddress2 : remoteAddress;
try (ChronicleMap<byte[], byte[]> map = ChronicleMapStatelessClientBuilder
.<byte[], byte[]>of(serverAddress)
try (ChronicleMap<byte[], byte[]> map = ChronicleMapBuilder
.of(byte[].class, byte[].class, serverAddress)
.putReturnsNull(true)
.removeReturnsNull(true)
.create()) {
@@ -138,8 +137,8 @@ public class BGChronicleTest {
futureList2.add(es.submit(new Callable<long[]>() {
@Override
public long[] call() throws IOException, InterruptedException {
try (ChronicleMap<byte[], byte[]> map = ChronicleMapStatelessClientBuilder
.<byte[], byte[]>of(remoteAddress)
try (ChronicleMap<byte[], byte[]> map = ChronicleMapBuilder
.of(byte[].class, byte[].class, remoteAddress)
.putReturnsNull(true)
.removeReturnsNull(true)
.create()) {