| Constructor and Description |
|---|
AbstractTopology(LatencyScoreStrategy strategy) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPool(HostConnectionPool<CL> pool)
Add a pool without knowing its token.
|
TokenHostConnectionPoolPartition<CL> |
getAllPools()
Return a partition that represents all hosts in the ring
|
TokenHostConnectionPoolPartition<CL> |
getPartition(java.nio.ByteBuffer rowkey)
Get the partition best suited to handle a row key
|
TokenHostConnectionPoolPartition<CL> |
getPartition(java.lang.String token)
Return the partition for a specific token
|
int |
getPartitionCount() |
java.util.List<java.lang.String> |
getPartitionNames() |
java.util.Map<java.lang.String,TokenHostConnectionPoolPartition<CL>> |
getPartitions() |
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(java.util.Collection<HostConnectionPool<CL>> ring)
Refresh the internal topology structure
|
void |
suspendPool(HostConnectionPool<CL> pool)
Suspend a host that is down
|
public AbstractTopology(LatencyScoreStrategy strategy)
public boolean setPools(java.util.Collection<HostConnectionPool<CL>> ring)
Topologypublic void resumePool(HostConnectionPool<CL> pool)
TopologyresumePool in interface Topology<CL>public void suspendPool(HostConnectionPool<CL> pool)
TopologysuspendPool in interface Topology<CL>public void refresh()
Topologypublic TokenHostConnectionPoolPartition<CL> getPartition(java.nio.ByteBuffer rowkey)
TopologygetPartition in interface Topology<CL>public TokenHostConnectionPoolPartition<CL> getAllPools()
TopologygetAllPools in interface Topology<CL>public int getPartitionCount()
getPartitionCount in interface Topology<CL>public void removePool(HostConnectionPool<CL> pool)
TopologyremovePool in interface Topology<CL>public void addPool(HostConnectionPool<CL> pool)
Topologypublic java.util.List<java.lang.String> getPartitionNames()
getPartitionNames in interface Topology<CL>public TokenHostConnectionPoolPartition<CL> getPartition(java.lang.String token)
TopologygetPartition in interface Topology<CL>public java.util.Map<java.lang.String,TokenHostConnectionPoolPartition<CL>> getPartitions()
getPartitions in interface Topology<CL>