mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Remove double and triple blank lines
This commit is contained in:
@@ -22,7 +22,6 @@ import net.openhft.chronicle.hash.ChronicleHashInstanceConfig;
|
||||
import net.openhft.chronicle.hash.FindByName;
|
||||
import net.openhft.chronicle.hash.replication.ReplicationChannel;
|
||||
import net.openhft.chronicle.hash.replication.ReplicationHub;
|
||||
import net.openhft.lang.io.Bytes;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -47,7 +46,6 @@ class ReplicationHubFindByName<K> implements FindByName {
|
||||
private final Map<String, ChronicleMapBuilderWithChannelId> map;
|
||||
private final ReplicationHub replicationHub;
|
||||
|
||||
|
||||
public static class ChronicleMapBuilderWithChannelId<K, V> implements Serializable {
|
||||
ChronicleHashBuilder<K, ChronicleMap<K, V>, ?> chronicleMapBuilder;
|
||||
int channelId;
|
||||
@@ -58,7 +56,6 @@ class ReplicationHubFindByName<K> implements FindByName {
|
||||
*/
|
||||
public ReplicationHubFindByName(ReplicationHub replicationHub) throws IOException {
|
||||
|
||||
|
||||
LOG.info("connecting to replicationHub=" + replicationHub);
|
||||
|
||||
this.replicationHub = replicationHub;
|
||||
@@ -92,7 +89,6 @@ class ReplicationHubFindByName<K> implements FindByName {
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
this.map = (Map) of(CharSequence.class, ChronicleMapBuilderWithChannelId.class)
|
||||
@@ -106,7 +102,6 @@ class ReplicationHubFindByName<K> implements FindByName {
|
||||
LOG.debug("map=" + map);
|
||||
}
|
||||
|
||||
|
||||
public <T extends ChronicleHash> T create(ChronicleMapBuilder<CharSequence, CharSequence> builder) throws IllegalArgumentException,
|
||||
IOException, TimeoutException, InterruptedException {
|
||||
|
||||
@@ -122,13 +117,11 @@ class ReplicationHubFindByName<K> implements FindByName {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public <T extends ChronicleHash> T from(String name) throws IllegalArgumentException,
|
||||
IOException, TimeoutException, InterruptedException {
|
||||
return (T) replicatedViaChannel(name).create();
|
||||
}
|
||||
|
||||
|
||||
ChronicleMapBuilderWithChannelId get(String name) throws IllegalArgumentException,
|
||||
TimeoutException,
|
||||
InterruptedException {
|
||||
@@ -140,7 +133,6 @@ class ReplicationHubFindByName<K> implements FindByName {
|
||||
return chronicleMapBuilder;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* * waits until map1 and map2 show the same value
|
||||
*
|
||||
@@ -160,7 +152,6 @@ class ReplicationHubFindByName<K> implements FindByName {
|
||||
|
||||
}
|
||||
|
||||
|
||||
private ChronicleHashInstanceConfig replicatedViaChannel(String name) throws TimeoutException, InterruptedException {
|
||||
ChronicleMapBuilderWithChannelId builder = get(name);
|
||||
return toReplicatedViaChannel(builder.chronicleMapBuilder, builder.channelId);
|
||||
@@ -196,5 +187,4 @@ class ReplicationHubFindByName<K> implements FindByName {
|
||||
return builder.instance().replicatedViaChannel(replicationHub.createChannel((short) withChannelId));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user