mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Moved name() from TcpTransportAndNetworkConfig to AbstractReplication
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package net.openhft.chronicle.map;
|
||||
|
||||
import net.openhft.chronicle.hash.replication.SingleChronicleHashReplication;
|
||||
import net.openhft.chronicle.hash.replication.TcpTransportAndNetworkConfig;
|
||||
import net.openhft.lang.io.ByteBufferBytes;
|
||||
import net.openhft.lang.model.Byteable;
|
||||
@@ -38,7 +39,7 @@ public class TcpReplicationSoakTest {
|
||||
|
||||
{
|
||||
final TcpTransportAndNetworkConfig tcpConfig1 = TcpTransportAndNetworkConfig.of(s_port,
|
||||
endpoint).autoReconnectedUponDroppedConnection(true).name(" map1")
|
||||
endpoint).autoReconnectedUponDroppedConnection(true)
|
||||
.heartBeatInterval(1, TimeUnit.SECONDS)
|
||||
.tcpBufferSize(1024 * 64);
|
||||
|
||||
@@ -46,20 +47,26 @@ public class TcpReplicationSoakTest {
|
||||
map1 = ChronicleMapBuilder.of(Integer.class, CharSequence.class)
|
||||
.entries(Builder.SIZE + Builder.SIZE)
|
||||
.actualSegments(1)
|
||||
.replication((byte) 1, tcpConfig1)
|
||||
.replication(SingleChronicleHashReplication.builder()
|
||||
.tcpTransportAndNetwork(tcpConfig1)
|
||||
.name("map1")
|
||||
.createWithId((byte) 1))
|
||||
.instance()
|
||||
.name("map1")
|
||||
.create();
|
||||
}
|
||||
{
|
||||
final TcpTransportAndNetworkConfig tcpConfig2 = TcpTransportAndNetworkConfig.of
|
||||
(s_port + 1).autoReconnectedUponDroppedConnection(true).name("map2")
|
||||
(s_port + 1).autoReconnectedUponDroppedConnection(true)
|
||||
.heartBeatInterval(1, TimeUnit.SECONDS)
|
||||
.tcpBufferSize(1024 * 64);
|
||||
|
||||
map2 = ChronicleMapBuilder.of(Integer.class, CharSequence.class)
|
||||
.entries(Builder.SIZE + Builder.SIZE)
|
||||
.replication((byte) 2, tcpConfig2)
|
||||
.replication(SingleChronicleHashReplication.builder()
|
||||
.tcpTransportAndNetwork(tcpConfig2)
|
||||
.name("map2")
|
||||
.createWithId((byte) 2))
|
||||
.instance()
|
||||
.name("map2")
|
||||
.create();
|
||||
|
||||
Reference in New Issue
Block a user