mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-163 kept the use of tcp() and udp() internal
This commit is contained in:
@@ -551,11 +551,21 @@ public class ChronicleMapBuilder<K, V> implements Cloneable,
|
||||
return toString().hashCode();
|
||||
}
|
||||
|
||||
public ChronicleMapBuilder<K, V> replicators(byte identifier, Replicator... replicators) {
|
||||
public ChronicleMapBuilder<K, V> replicators(byte identifier, ReplicatorConfig... replicatorConfigs) {
|
||||
|
||||
this.identifier = identifier;
|
||||
this.replicators.clear();
|
||||
for (Replicator replicator : replicators) {
|
||||
for (ReplicatorConfig replicatorConfig : replicatorConfigs) {
|
||||
|
||||
Replicator replicator;
|
||||
if (replicatorConfig instanceof TcpReplicationReplicatorConfig) {
|
||||
replicator = Replicators.tcp((TcpReplicationReplicatorConfig) replicatorConfig);
|
||||
} else if (replicatorConfig instanceof UdpReplicationReplicatorConfig) {
|
||||
replicator = Replicators.udp((UdpReplicationReplicatorConfig) replicatorConfig);
|
||||
} else
|
||||
throw new UnsupportedOperationException();
|
||||
|
||||
|
||||
this.replicators.put(replicator.getClass(), replicator);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user