|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.netflix.astyanax.connectionpool.impl.TokenPartitionedTopology<CL>
public class TokenPartitionedTopology<CL>
Constructor Summary | |
---|---|
TokenPartitionedTopology(LatencyScoreStrategy strategy)
|
Method Summary | |
---|---|
void |
addPool(HostConnectionPool<CL> pool)
Add a pool without knowing it's token. |
HostConnectionPoolPartition<CL> |
getAllPools()
Return a partition that represents all hosts in the ring |
HostConnectionPoolPartition<CL> |
getPartition(BigInteger token)
Search for the partition that owns this token |
int |
getPartitionCount()
Get total number of tokens in the topology |
protected HostConnectionPoolPartition<CL> |
makePartition(BigInteger partition)
|
void |
refresh()
Refresh the internal state and apply the latency score strategy |
void |
removePool(HostConnectionPool<CL> pool)
Remove this pool from all partitions |
void |
resumePool(HostConnectionPool<CL> pool)
Resume a host that was previously down |
boolean |
setPools(Map<BigInteger,Collection<HostConnectionPool<CL>>> ring)
Refresh the internal topology structure |
void |
suspendPool(HostConnectionPool<CL> pool)
Suspend a host that is down |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TokenPartitionedTopology(LatencyScoreStrategy strategy)
Method Detail |
---|
protected HostConnectionPoolPartition<CL> makePartition(BigInteger partition)
public boolean setPools(Map<BigInteger,Collection<HostConnectionPool<CL>>> ring)
Topology
setPools
in interface Topology<CL>
public void resumePool(HostConnectionPool<CL> pool)
Topology
resumePool
in interface Topology<CL>
public void suspendPool(HostConnectionPool<CL> pool)
Topology
suspendPool
in interface Topology<CL>
public void refresh()
Topology
refresh
in interface Topology<CL>
public HostConnectionPoolPartition<CL> getPartition(BigInteger token)
Topology
getPartition
in interface Topology<CL>
public HostConnectionPoolPartition<CL> getAllPools()
Topology
getAllPools
in interface Topology<CL>
public int getPartitionCount()
Topology
getPartitionCount
in interface Topology<CL>
public void removePool(HostConnectionPool<CL> pool)
Topology
removePool
in interface Topology<CL>
public void addPool(HostConnectionPool<CL> pool)
Topology
addPool
in interface Topology<CL>
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |