public class Distributor extends Object implements Closeable
| Constructor and Description |
|---|
Distributor(com.google.common.collect.ImmutableList<Node> pool,
Strategy strategy,
NodeHealthCheck nodeHealthCheck,
XioTimer xioTimer) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Node |
getNodeById(UUID id)
The node returned by UUID.
|
List<NodeStat> |
getNodeStat() |
Map<UUID,Node> |
getOkNodes() |
com.google.common.collect.ImmutableList<Node> |
getPool() |
Node |
pick()
Pick the next node.
|
Distributor |
rebuild()
Rebuild this distributor.
|
Distributor |
rebuild(com.google.common.collect.ImmutableList<Node> list)
Rebuild this distributor with a new vector.
|
void |
stop() |
public Distributor(com.google.common.collect.ImmutableList<Node> pool, Strategy strategy, NodeHealthCheck nodeHealthCheck, XioTimer xioTimer)
public void stop()
public Node pick()
public Distributor rebuild()
public Distributor rebuild(com.google.common.collect.ImmutableList<Node> list)
public com.google.common.collect.ImmutableList<Node> getPool()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2016. All Rights Reserved.