From 59f53fd1154df1b12a5e13d5b2b90bb621edf8ac Mon Sep 17 00:00:00 2001 From: leventov Date: Tue, 11 Nov 2014 17:16:37 +0300 Subject: [PATCH] Renamed TcpConfig static factories back to of() --- README.md | 26 +++++++++---------- .../TcpTransportAndNetworkConfig.java | 21 ++++----------- .../openhft/chronicle/map/NodeDiscovery.java | 2 +- .../net/openhft/chronicle/map/Builder.java | 2 +- .../chronicle/map/ChannelReplicationTest.java | 4 +-- ...tListenerTestWithTCPSocketReplication.java | 6 ++--- .../map/PostChannelCreationTest.java | 4 +-- .../chronicle/map/SingleMapChannelTest.java | 4 +-- .../chronicle/map/StatelessClientTest.java | 22 ++++++++-------- ...cketReplication3wayPutReturnsNullTest.java | 2 +- .../map/TwoMapOnDifferentServersTest.java | 4 +-- .../chronicle/map/example/ChannelExample.java | 4 +-- .../jrs166/map/StatelessChronicleMapTest.java | 4 +-- .../SetForTCPSocketReplication3wayTest.java | 2 +- 14 files changed, 47 insertions(+), 60 deletions(-) diff --git a/README.md b/README.md index c2bd8d6af..6c5b08040 100644 --- a/README.md +++ b/README.md @@ -752,12 +752,12 @@ require 6 connections. In our case we are only using 2 maps, this is how we connected map1 to map 2. ``` -TcpTransportAndNetworkConfig.forSendingNode(8076, new InetSocketAddress("localhost", 8077)) +TcpTransportAndNetworkConfig.of(8076, new InetSocketAddress("localhost", 8077)) .heartBeatInterval(1, SECONDS); ``` you could have put this instruction on map2 instead, like this ``` -TcpTransportAndNetworkConfig.forSendingNode(8077, new InetSocketAddress("localhost", 8076)) +TcpTransportAndNetworkConfig.of(8077, new InetSocketAddress("localhost", 8076)) .heartBeatInterval(1, SECONDS); ``` even though data flows from map1 to map2 and map2 to map1 it doesn't matter which way you connected @@ -786,15 +786,15 @@ InetSocketAddress inetSocketAddress3 = new InetSocketAddress(hostServer3, server // this is to go on server 1 TcpTransportAndNetworkConfig tcpConfigServer1 = - TcpTransportAndNetworkConfig.forReceivingOnlyNode(serverPort1); + TcpTransportAndNetworkConfig.of(serverPort1); // this is to go on server 2 TcpTransportAndNetworkConfig tcpConfigServer2 = TcpTransportAndNetworkConfig - .forSendingNode(serverPort2, inetSocketAddress1); + .of(serverPort2, inetSocketAddress1); // this is to go on server 3 TcpTransportAndNetworkConfig tcpConfigServer3 = TcpTransportAndNetworkConfig - .forSendingNode(serverPort3, inetSocketAddress1, inetSocketAddress2); + .of(serverPort3, inetSocketAddress1, inetSocketAddress2); ``` ### Heart Beat Interval @@ -931,7 +931,7 @@ unique for each map you have. byte identifier = (byte) 2; TcpTransportAndNetworkConfig tcpConfig = TcpTransportAndNetworkConfig - .forReceivingOnlyNode(8087).heartBeatInterval(1, SECONDS); + .of(8087).heartBeatInterval(1, SECONDS); hubOnServer2 = ReplicationHub.builder() .tcpTransportAndNetwork(tcpConfig) @@ -1005,7 +1005,7 @@ final ChronicleMap statelessMap; { ChronicleMapBuilder.of(Integer.class, CharSequence.class) - .replication((byte) 2, TcpTransportAndNetworkConfig.forReceivingOnlyNode(8076)) + .replication((byte) 2, TcpTransportAndNetworkConfig.of(8076)) .create(); serverMap.put(10, "EXAMPLE-10"); @@ -1033,7 +1033,7 @@ being used by another application. In this example we choose the port 8076 ``` java // sets the server to run on localhost:8076 -.replication((byte) 2, TcpTransportAndNetworkConfig.forReceivingOnlyNode(8076)) +.replication((byte) 2, TcpTransportAndNetworkConfig.of(8076)) ``` On the "stateless client" we connect to the server via TCP/IP on localhost:8076 : @@ -1100,7 +1100,7 @@ For the very best performance you should also set these properties on the server ``` java ChronicleMapBuilder.of(Integer.class, CharSequence.class) - .replication((byte) 2, TcpTransportAndNetworkConfig.forReceivingOnlyNode(8076)) + .replication((byte) 2, TcpTransportAndNetworkConfig.of(8076)) .putReturnsNull(true) .removeReturnsNull(true) .create(); @@ -1273,7 +1273,7 @@ public class YourClass { // we connect the maps via a TCP/IP socket connection on port 8077 TcpTransportAndNetworkConfig tcpConfig = TcpTransportAndNetworkConfig - .forSendingNode(8076, new InetSocketAddress("localhost", 8077)) + .of(8076, new InetSocketAddress("localhost", 8077)) .heartBeatInterval(1L, TimeUnit.SECONDS); ChronicleMapBuilder map1Builder = ChronicleMapBuilder.of(Integer.class, CharSequence.class) @@ -1287,7 +1287,7 @@ public class YourClass { { TcpTransportAndNetworkConfig tcpConfig = - TcpTransportAndNetworkConfig.forReceivingOnlyNode(8077) + TcpTransportAndNetworkConfig.of(8077) .heartBeatInterval(1L, TimeUnit.SECONDS); ChronicleMapBuilder map2Builder = ChronicleMapBuilder.of(Integer.class, CharSequence.class) @@ -1355,7 +1355,7 @@ public class YourClass { // we connect the maps via a TCP socket connection on port 8077 TcpTransportAndNetworkConfig tcpConfig = TcpTransportAndNetworkConfig - .forSendingNode(8076, new InetSocketAddress("localhost", 8077)) + .of(8076, new InetSocketAddress("localhost", 8077)) .heartBeatInterval(1L, TimeUnit.SECONDS) // a maximum of 1024 bits per millisecond @@ -1380,7 +1380,7 @@ public class YourClass { { TcpTransportAndNetworkConfig tcpConfig = - TcpTransportAndNetworkConfig.forReceivingOnlyNode(8077) + TcpTransportAndNetworkConfig.of(8077) .heartBeatInterval(1L, TimeUnit.SECONDS) .throttlingConfig(ThrottlingConfig.throttle(1024, TimeUnit.MILLISECONDS)); diff --git a/src/main/java/net/openhft/chronicle/hash/replication/TcpTransportAndNetworkConfig.java b/src/main/java/net/openhft/chronicle/hash/replication/TcpTransportAndNetworkConfig.java index 878fc951c..89c04a680 100644 --- a/src/main/java/net/openhft/chronicle/hash/replication/TcpTransportAndNetworkConfig.java +++ b/src/main/java/net/openhft/chronicle/hash/replication/TcpTransportAndNetworkConfig.java @@ -54,24 +54,13 @@ public final class TcpTransportAndNetworkConfig { this.heartBeatIntervalUnit = heartBeatIntervalUnit; } - public static TcpTransportAndNetworkConfig forSendingNode(int serverPort, - InetSocketAddress... endpoints) { - return forSendingNode(serverPort, Arrays.asList(endpoints)); + public static TcpTransportAndNetworkConfig of(int serverPort, + InetSocketAddress... endpoints) { + return of(serverPort, Arrays.asList(endpoints)); } - public static TcpTransportAndNetworkConfig forSendingNode(int serverPort, - Collection endpoints) { - if (endpoints.isEmpty()) - throw new IllegalArgumentException("There should be some endpoints"); - return forUnknownTopology(serverPort, endpoints); - } - - public static TcpTransportAndNetworkConfig forReceivingOnlyNode(int serverPort) { - return forUnknownTopology(serverPort, Collections.emptyList()); - } - - public static TcpTransportAndNetworkConfig forUnknownTopology(int serverPort, - Collection endpoints) { + public static TcpTransportAndNetworkConfig of(int serverPort, + Collection endpoints) { for (final InetSocketAddress endpoint : endpoints) { if (endpoint.getPort() == serverPort && "localhost".equals(endpoint.getHostName())) throw new IllegalArgumentException("endpoint=" + endpoint diff --git a/src/main/java/net/openhft/chronicle/map/NodeDiscovery.java b/src/main/java/net/openhft/chronicle/map/NodeDiscovery.java index eadb51821..6e614410c 100644 --- a/src/main/java/net/openhft/chronicle/map/NodeDiscovery.java +++ b/src/main/java/net/openhft/chronicle/map/NodeDiscovery.java @@ -223,7 +223,7 @@ public class NodeDiscovery { knownNodes.add(ourAddressAndPort, identifier); final TcpTransportAndNetworkConfig tcpConfig = TcpTransportAndNetworkConfig - .forUnknownTopology(ourAddressAndPort.getPort(), + .of(ourAddressAndPort.getPort(), toInetSocketCollection(knownHostPorts)) .heartBeatInterval(1, SECONDS); diff --git a/src/test/java/net/openhft/chronicle/map/Builder.java b/src/test/java/net/openhft/chronicle/map/Builder.java index 73ffce84b..073e204fb 100644 --- a/src/test/java/net/openhft/chronicle/map/Builder.java +++ b/src/test/java/net/openhft/chronicle/map/Builder.java @@ -72,7 +72,7 @@ public class Builder { final byte identifier, final int serverPort, final InetSocketAddress... endpoints) throws IOException { - TcpTransportAndNetworkConfig tcpConfig = TcpTransportAndNetworkConfig.forUnknownTopology(serverPort, Arrays.asList(endpoints)) + TcpTransportAndNetworkConfig tcpConfig = TcpTransportAndNetworkConfig.of(serverPort, Arrays.asList(endpoints)) .heartBeatInterval(1L, TimeUnit.SECONDS); return ChronicleMapBuilder.of(kClass, vClass) .replication(identifier, tcpConfig); diff --git a/src/test/java/net/openhft/chronicle/map/ChannelReplicationTest.java b/src/test/java/net/openhft/chronicle/map/ChannelReplicationTest.java index 3feaf6dfb..717e943d4 100644 --- a/src/test/java/net/openhft/chronicle/map/ChannelReplicationTest.java +++ b/src/test/java/net/openhft/chronicle/map/ChannelReplicationTest.java @@ -54,7 +54,7 @@ public class ChannelReplicationTest { public void setup() throws IOException { { TcpTransportAndNetworkConfig tcpConfig = TcpTransportAndNetworkConfig - .forSendingNode(8086, new InetSocketAddress("localhost", 8087)) + .of(8086, new InetSocketAddress("localhost", 8087)) .heartBeatInterval(1, SECONDS); hubA = ReplicationHub.builder() @@ -68,7 +68,7 @@ public class ChannelReplicationTest { { TcpTransportAndNetworkConfig tcpConfig = - TcpTransportAndNetworkConfig.forReceivingOnlyNode(8087).heartBeatInterval(1, SECONDS); + TcpTransportAndNetworkConfig.of(8087).heartBeatInterval(1, SECONDS); hubB = ReplicationHub.builder().tcpTransportAndNetwork(tcpConfig) .createWithId((byte) 2); diff --git a/src/test/java/net/openhft/chronicle/map/EventListenerTestWithTCPSocketReplication.java b/src/test/java/net/openhft/chronicle/map/EventListenerTestWithTCPSocketReplication.java index e4ecb2849..49beb7104 100644 --- a/src/test/java/net/openhft/chronicle/map/EventListenerTestWithTCPSocketReplication.java +++ b/src/test/java/net/openhft/chronicle/map/EventListenerTestWithTCPSocketReplication.java @@ -30,8 +30,6 @@ import java.net.InetSocketAddress; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; -import static net.openhft.chronicle.hash.replication.TcpTransportAndNetworkConfig.forSendingNode; - /** * Test ReplicatedChronicleMap where the Replicated is over a TCP Socket * @@ -240,7 +238,7 @@ public class EventListenerTestWithTCPSocketReplication { } private ChronicleMapBuilder clientBuilder() { - TcpTransportAndNetworkConfig tcpConfig = TcpTransportAndNetworkConfig.forReceivingOnlyNode(8077); + TcpTransportAndNetworkConfig tcpConfig = TcpTransportAndNetworkConfig.of(8077); return ChronicleMapBuilder.of(Integer.class, CharSequence.class) .entries(20000L) .replication((byte) 1, tcpConfig) @@ -259,7 +257,7 @@ public class EventListenerTestWithTCPSocketReplication { } private ChronicleMapBuilder serverBuilder() { - TcpTransportAndNetworkConfig tcpConfig = forSendingNode(8076, new InetSocketAddress("localhost", 8077)); + TcpTransportAndNetworkConfig tcpConfig = TcpTransportAndNetworkConfig.of(8076, new InetSocketAddress("localhost", 8077)); return ChronicleMapBuilder.of(Integer.class, CharSequence.class) .entries(20000L) .replication((byte) 2, tcpConfig); diff --git a/src/test/java/net/openhft/chronicle/map/PostChannelCreationTest.java b/src/test/java/net/openhft/chronicle/map/PostChannelCreationTest.java index b86bf8ce2..a7db4b5fc 100644 --- a/src/test/java/net/openhft/chronicle/map/PostChannelCreationTest.java +++ b/src/test/java/net/openhft/chronicle/map/PostChannelCreationTest.java @@ -63,7 +63,7 @@ public class PostChannelCreationTest { { final TcpTransportAndNetworkConfig tcpConfig = TcpTransportAndNetworkConfig - .forSendingNode(8086, new InetSocketAddress("localhost", 8087)) + .of(8086, new InetSocketAddress("localhost", 8087)) .heartBeatInterval(1, SECONDS); hubA = ReplicationHub.builder().tcpTransportAndNetwork(tcpConfig) @@ -82,7 +82,7 @@ public class PostChannelCreationTest { { final TcpTransportAndNetworkConfig tcpConfig = TcpTransportAndNetworkConfig - .forSendingNode(8087, new InetSocketAddress("localhost", 8086)) + .of(8087, new InetSocketAddress("localhost", 8086)) .heartBeatInterval(1, SECONDS); hubB = ReplicationHub.builder().tcpTransportAndNetwork(tcpConfig) diff --git a/src/test/java/net/openhft/chronicle/map/SingleMapChannelTest.java b/src/test/java/net/openhft/chronicle/map/SingleMapChannelTest.java index e58e04b19..315cd86e6 100644 --- a/src/test/java/net/openhft/chronicle/map/SingleMapChannelTest.java +++ b/src/test/java/net/openhft/chronicle/map/SingleMapChannelTest.java @@ -61,7 +61,7 @@ public class SingleMapChannelTest { { final TcpTransportAndNetworkConfig tcpConfig = TcpTransportAndNetworkConfig - .forSendingNode(8086, new InetSocketAddress("localhost", 8087)) + .of(8086, new InetSocketAddress("localhost", 8087)) .heartBeatInterval(1, SECONDS); int maxEntrySize = 1024; byte identifier= 1; @@ -78,7 +78,7 @@ public class SingleMapChannelTest { { final TcpTransportAndNetworkConfig tcpConfig = TcpTransportAndNetworkConfig - .forSendingNode(8087, new InetSocketAddress("localhost", 8086)) + .of(8087, new InetSocketAddress("localhost", 8086)) .heartBeatInterval(1, SECONDS); hubB = ReplicationHub.builder().tcpTransportAndNetwork(tcpConfig).createWithId((byte) 2); diff --git a/src/test/java/net/openhft/chronicle/map/StatelessClientTest.java b/src/test/java/net/openhft/chronicle/map/StatelessClientTest.java index 941fec300..b33422004 100644 --- a/src/test/java/net/openhft/chronicle/map/StatelessClientTest.java +++ b/src/test/java/net/openhft/chronicle/map/StatelessClientTest.java @@ -56,7 +56,7 @@ public class StatelessClientTest { // server { serverMap = ChronicleMapBuilder.of(Integer.class, CharSequence.class) - .replication((byte) 2, TcpTransportAndNetworkConfig.forReceivingOnlyNode(8086)).create(); + .replication((byte) 2, TcpTransportAndNetworkConfig.of(8086)).create(); } @@ -99,7 +99,7 @@ public class StatelessClientTest { // server { serverMap = ChronicleMapBuilder.of(Integer.class, CharSequence.class) - .replication((byte) 2, TcpTransportAndNetworkConfig.forReceivingOnlyNode(8086)).create(); + .replication((byte) 2, TcpTransportAndNetworkConfig.of(8086)).create(); } @@ -140,7 +140,7 @@ public class StatelessClientTest { // server { serverMap = ChronicleMapBuilder.of(Integer.class, CharSequence.class) - .replication((byte) 2, TcpTransportAndNetworkConfig.forReceivingOnlyNode(8086)).create(); + .replication((byte) 2, TcpTransportAndNetworkConfig.of(8086)).create(); } @@ -173,7 +173,7 @@ public class StatelessClientTest { // server { serverMap = ChronicleMapBuilder.of(Integer.class, CharSequence.class) - .replication((byte) 2, TcpTransportAndNetworkConfig.forReceivingOnlyNode(8086)).create(); + .replication((byte) 2, TcpTransportAndNetworkConfig.of(8086)).create(); serverMap.put(10, "EXAMPLE-10"); } @@ -212,7 +212,7 @@ public class StatelessClientTest { // server { serverMap = ChronicleMapBuilder.of(Integer.class, CharSequence.class) - .replication((byte) 2, TcpTransportAndNetworkConfig.forReceivingOnlyNode(8086)).create(); + .replication((byte) 2, TcpTransportAndNetworkConfig.of(8086)).create(); serverMap.put(10, "EXAMPLE-10"); } @@ -244,7 +244,7 @@ public class StatelessClientTest { // server { serverMap = ChronicleMapBuilder.of(Integer.class, CharSequence.class) - .replication((byte) 2, TcpTransportAndNetworkConfig.forReceivingOnlyNode(8086)).create(); + .replication((byte) 2, TcpTransportAndNetworkConfig.of(8086)).create(); } @@ -287,7 +287,7 @@ public class StatelessClientTest { // server { serverMap = ChronicleMapBuilder.of(Integer.class, CharSequence.class) - .replication((byte) 2, TcpTransportAndNetworkConfig.forReceivingOnlyNode(8086)) + .replication((byte) 2, TcpTransportAndNetworkConfig.of(8086)) .putReturnsNull(true) .create(); } @@ -333,7 +333,7 @@ public class StatelessClientTest { // server { serverMap = ChronicleMapBuilder.of(Integer.class, CharSequence.class) - .replication((byte) 2, TcpTransportAndNetworkConfig.forReceivingOnlyNode(8086)) + .replication((byte) 2, TcpTransportAndNetworkConfig.of(8086)) .putReturnsNull(true) .removeReturnsNull(true) .create(); @@ -372,7 +372,7 @@ public class StatelessClientTest { // server { serverMap = ChronicleMapBuilder.of(Integer.class, CharSequence.class) - .replication((byte) 2, TcpTransportAndNetworkConfig.forReceivingOnlyNode(8086)) + .replication((byte) 2, TcpTransportAndNetworkConfig.of(8086)) .putReturnsNull(true) .removeReturnsNull(true) .create(); @@ -415,9 +415,9 @@ public class StatelessClientTest { // server { serverMap1 = ChronicleMapBuilder.of(Integer.class, CharSequence.class) - .replication((byte) 2, TcpTransportAndNetworkConfig.forReceivingOnlyNode(8086)).create(); + .replication((byte) 2, TcpTransportAndNetworkConfig.of(8086)).create(); serverMap2 = ChronicleMapBuilder.of(Integer.class, CharSequence.class) - .replication((byte) 2, TcpTransportAndNetworkConfig.forReceivingOnlyNode(8077)).create(); + .replication((byte) 2, TcpTransportAndNetworkConfig.of(8077)).create(); } diff --git a/src/test/java/net/openhft/chronicle/map/TCPSocketReplication3wayPutReturnsNullTest.java b/src/test/java/net/openhft/chronicle/map/TCPSocketReplication3wayPutReturnsNullTest.java index 0bab4eed5..d8a1debb7 100644 --- a/src/test/java/net/openhft/chronicle/map/TCPSocketReplication3wayPutReturnsNullTest.java +++ b/src/test/java/net/openhft/chronicle/map/TCPSocketReplication3wayPutReturnsNullTest.java @@ -48,7 +48,7 @@ public class TCPSocketReplication3wayPutReturnsNullTest { final byte identifier, final int serverPort, final InetSocketAddress... endpoints) throws IOException { - TcpTransportAndNetworkConfig tcpConfig = TcpTransportAndNetworkConfig.forUnknownTopology(serverPort, Arrays.asList(endpoints)); + TcpTransportAndNetworkConfig tcpConfig = TcpTransportAndNetworkConfig.of(serverPort, Arrays.asList(endpoints)); return (T) ChronicleMapBuilder.of(Integer.class, CharSequence.class) .putReturnsNull(true) diff --git a/src/test/java/net/openhft/chronicle/map/TwoMapOnDifferentServersTest.java b/src/test/java/net/openhft/chronicle/map/TwoMapOnDifferentServersTest.java index 67bf5e40c..484c8c769 100644 --- a/src/test/java/net/openhft/chronicle/map/TwoMapOnDifferentServersTest.java +++ b/src/test/java/net/openhft/chronicle/map/TwoMapOnDifferentServersTest.java @@ -44,7 +44,7 @@ public class TwoMapOnDifferentServersTest { public void setup() throws IOException { final TcpTransportAndNetworkConfig tcpConfig = - TcpTransportAndNetworkConfig.forSendingNode(8076, new InetSocketAddress("localhost", 8077)) + TcpTransportAndNetworkConfig.of(8076, new InetSocketAddress("localhost", 8077)) .heartBeatInterval(1, SECONDS); @@ -54,7 +54,7 @@ public class TwoMapOnDifferentServersTest { map2 = ChronicleMapBuilder.of(Integer.class, CharSequence.class) .entries(20000) - .replication((byte) 2, TcpTransportAndNetworkConfig.forReceivingOnlyNode(8077) + .replication((byte) 2, TcpTransportAndNetworkConfig.of(8077) .heartBeatInterval(1, SECONDS)).create(); } diff --git a/src/test/java/net/openhft/chronicle/map/example/ChannelExample.java b/src/test/java/net/openhft/chronicle/map/example/ChannelExample.java index cfc7988c9..6adebf43c 100644 --- a/src/test/java/net/openhft/chronicle/map/example/ChannelExample.java +++ b/src/test/java/net/openhft/chronicle/map/example/ChannelExample.java @@ -70,7 +70,7 @@ public class ChannelExample { byte identifier = (byte) 1; TcpTransportAndNetworkConfig tcpConfig = TcpTransportAndNetworkConfig - .forSendingNode(8086, new InetSocketAddress("localhost", 8087)) + .of(8086, new InetSocketAddress("localhost", 8087)) .heartBeatInterval(1, SECONDS); @@ -105,7 +105,7 @@ public class ChannelExample { byte identifier = (byte) 2; TcpTransportAndNetworkConfig tcpConfig = - TcpTransportAndNetworkConfig.forReceivingOnlyNode(8087).heartBeatInterval(1, SECONDS); + TcpTransportAndNetworkConfig.of(8087).heartBeatInterval(1, SECONDS); hubOnServer2 = ReplicationHub.builder() .tcpTransportAndNetwork(tcpConfig) diff --git a/src/test/java/net/openhft/chronicle/map/jrs166/map/StatelessChronicleMapTest.java b/src/test/java/net/openhft/chronicle/map/jrs166/map/StatelessChronicleMapTest.java index f1ac2f7c8..bbde965bb 100644 --- a/src/test/java/net/openhft/chronicle/map/jrs166/map/StatelessChronicleMapTest.java +++ b/src/test/java/net/openhft/chronicle/map/jrs166/map/StatelessChronicleMapTest.java @@ -192,7 +192,7 @@ public class StatelessChronicleMapTest extends JSR166TestCase { final ChronicleMap serverMap = ChronicleMapBuilder.of(Integer.class, String.class) - .replication((byte) 1, TcpTransportAndNetworkConfig.forReceivingOnlyNode(port)).create(); + .replication((byte) 1, TcpTransportAndNetworkConfig.of(port)).create(); final ChronicleMap statelessMap = ChronicleMapBuilder.of(Integer .class, String.class) @@ -206,7 +206,7 @@ public class StatelessChronicleMapTest extends JSR166TestCase { IOException { final ChronicleMap serverMap = ChronicleMapBuilder.of(CharSequence.class, CharSequence.class) - .replication((byte) 2, TcpTransportAndNetworkConfig.forReceivingOnlyNode(port)).create(); + .replication((byte) 2, TcpTransportAndNetworkConfig.of(port)).create(); final ChronicleMap statelessMap = ChronicleMapBuilder.of(CharSequence diff --git a/src/test/java/net/openhft/chronicle/set/SetForTCPSocketReplication3wayTest.java b/src/test/java/net/openhft/chronicle/set/SetForTCPSocketReplication3wayTest.java index 627c6cad5..5677a48c0 100644 --- a/src/test/java/net/openhft/chronicle/set/SetForTCPSocketReplication3wayTest.java +++ b/src/test/java/net/openhft/chronicle/set/SetForTCPSocketReplication3wayTest.java @@ -52,7 +52,7 @@ public class SetForTCPSocketReplication3wayTest { final int serverPort, final InetSocketAddress... endpoints) throws IOException { return (T) ChronicleSetBuilder.of(Integer.class) - .replication(identifier, TcpTransportAndNetworkConfig.forUnknownTopology(serverPort, asList(endpoints)) + .replication(identifier, TcpTransportAndNetworkConfig.of(serverPort, asList(endpoints)) .heartBeatInterval(1L, SECONDS)) .createPersistedTo(getPersistenceFile()); }