mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-163 renamed channel replicator to channel provider
This commit is contained in:
@@ -41,8 +41,8 @@ public class SingleMapClusterTest {
|
||||
|
||||
private ChronicleMap<Integer, CharSequence> map1b;
|
||||
|
||||
private ChannelReplicator channelReplicatorA;
|
||||
private ChannelReplicator channelReplicatorB;
|
||||
private ChannelProvider channelProviderA;
|
||||
private ChannelProvider channelProviderB;
|
||||
|
||||
public static File getPersistenceFile() {
|
||||
String TMP = System.getProperty("java.io.tmpdir");
|
||||
@@ -60,12 +60,12 @@ public class SingleMapClusterTest {
|
||||
.of(8086, new InetSocketAddress("localhost", 8087))
|
||||
.heartBeatInterval(1, SECONDS);
|
||||
|
||||
channelReplicatorA = new ChannelReplicatorBuilder((byte) 1, 1024)
|
||||
.tcpReplication(tcpReplicationConfig).create();
|
||||
channelProviderA = new ChannelProviderBuilder()
|
||||
.replicators((byte) 1, tcpReplicationConfig).create();
|
||||
// this is how you add maps after the custer is created
|
||||
map1a = ChronicleMapBuilder.of(Integer.class, CharSequence.class)
|
||||
.entries(1000)
|
||||
.channel(channelReplicatorA.createChannel((short) 1))
|
||||
.channel(channelProviderA.createChannel((short) 1))
|
||||
.create(getPersistenceFile());
|
||||
}
|
||||
|
||||
@@ -75,11 +75,12 @@ public class SingleMapClusterTest {
|
||||
.of(8087, new InetSocketAddress("localhost", 8086))
|
||||
.heartBeatInterval(1, SECONDS);
|
||||
|
||||
channelReplicatorB = new ChannelReplicatorBuilder((byte) 2, 1024)
|
||||
.tcpReplication(tcpReplicationConfig).create();
|
||||
channelProviderB = new ChannelProviderBuilder()
|
||||
.replicators((byte) 2, tcpReplicationConfig).create();
|
||||
|
||||
// this is how you add maps after the custer is created
|
||||
map1b = ChronicleMapBuilder.of(Integer.class, CharSequence.class)
|
||||
.channel(channelReplicatorB.createChannel((short) 1))
|
||||
.channel(channelProviderB.createChannel((short) 1))
|
||||
.entries(1000)
|
||||
.create(getPersistenceFile());
|
||||
}
|
||||
@@ -88,7 +89,7 @@ public class SingleMapClusterTest {
|
||||
@After
|
||||
public void tearDown() throws InterruptedException {
|
||||
|
||||
for (final Closeable closeable : new Closeable[]{channelReplicatorA, channelReplicatorB}) {
|
||||
for (final Closeable closeable : new Closeable[]{channelProviderA, channelProviderB}) {
|
||||
try {
|
||||
closeable.close();
|
||||
} catch (IOException e) {
|
||||
|
||||
Reference in New Issue
Block a user