Skip to content

Commit

Permalink
cells: Minor cleaning of location manager
Browse files Browse the repository at this point in the history
Target: trunk
Require-notes: no
Require-book: no
Acked-by: Tigran Mkrtchyan <tigran mkrtchyan@desy.de>

Reviewed at https://rb.dcache.org/r/9750/
  • Loading branch information
gbehrmann committed Sep 15, 2016
1 parent c0ac545 commit 0d0ea8f
Showing 1 changed file with 5 additions and 7 deletions.
Expand Up @@ -21,7 +21,6 @@

import com.google.common.net.HostAndPort;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.recipes.cache.ChildData;
import org.apache.curator.framework.recipes.cache.PathChildrenCacheEvent;
import org.apache.curator.framework.recipes.nodes.PersistentNode;
import org.apache.curator.utils.CloseableUtils;
Expand All @@ -34,6 +33,7 @@
import java.io.IOException;
import java.net.InetAddress;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentHashMap;
Expand Down Expand Up @@ -128,12 +128,6 @@ void setLocalAddress(HostAndPort address) throws Exception
}
}

HostAndPort readAddressOf(String domainName)
{
ChildData data = cores.getCurrentData(pathOf(domainName));
return (data == null) ? null : toHostAndPort(data.getData());
}

Map<String,HostAndPort> cores()
{
return cores.getCurrentData().stream()
Expand All @@ -158,6 +152,10 @@ byte[] toBytes(HostAndPort address)
*/
public class Client implements CellEventListener
{
/**
* Concurrent map because cellDied may be called from outside the cell message
* thread.
*/
private final ConcurrentMap<String, String> connectors = new ConcurrentHashMap<>();

public Client()
Expand Down

0 comments on commit 0d0ea8f

Please sign in to comment.