Moved name() from TcpTransportAndNetworkConfig to AbstractReplication

This commit is contained in:
leventov
2015-02-03 22:37:41 +07:00
parent 8ed1c8d2af
commit 5fe9e686d2
12 changed files with 126 additions and 76 deletions
@@ -66,7 +66,7 @@ final class ChannelProvider implements Closeable {
final TcpReplicator tcpReplicator = new TcpReplicator(
channelProvider.asReplica,
channelProvider.asEntryExternalizable,
tcpConfig, hub.remoteNodeValidator(), null);
tcpConfig, hub.remoteNodeValidator(), null, hub.name());
channelProvider.add(tcpReplicator);
}
@@ -126,7 +126,8 @@ final class Replicators {
return new TcpReplicator(replica, entryExternalizable,
tcpConfig,
replication.remoteNodeValidator(), statelessClientParameters);
replication.remoteNodeValidator(), statelessClientParameters,
replication.name());
}
};
}
@@ -123,7 +123,8 @@ final class TcpReplicator<K, V> extends AbstractChannelReplicator implements Clo
@NotNull final Replica.EntryExternalizable externalizable,
@NotNull final TcpTransportAndNetworkConfig replicationConfig,
@Nullable final RemoteNodeValidator remoteNodeValidator,
@Nullable final StatelessClientParameters statelessClientParameters)
@Nullable final StatelessClientParameters statelessClientParameters,
String name)
throws IOException {
super("TcpSocketReplicator-" + replica.identifier(), replicationConfig.throttlingConfig());
@@ -144,7 +145,7 @@ final class TcpReplicator<K, V> extends AbstractChannelReplicator implements Clo
this.replicationConfig = replicationConfig;
this.remoteNodeValidator = remoteNodeValidator;
this.name = replicationConfig.name();
this.name = name;
start();
}