com.netflix.astyanax.connectionpool.impl
Interface Topology<CL>

All Known Implementing Classes:
TokenPartitionedTopology

public interface Topology<CL>


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
 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
 

Method Detail

setPools

boolean setPools(Map<BigInteger,Collection<HostConnectionPool<CL>>> ring)
Refresh the internal topology structure

Parameters:
ring -
Returns:

addPool

void addPool(HostConnectionPool<CL> pool)
Add a pool without knowing it's token. This pool will be added to the all pools partition only

Parameters:
pool -

removePool

void removePool(HostConnectionPool<CL> pool)
Remove this pool from all partitions

Parameters:
pool -

resumePool

void resumePool(HostConnectionPool<CL> pool)
Resume a host that was previously down

Parameters:
pool -

suspendPool

void suspendPool(HostConnectionPool<CL> pool)
Suspend a host that is down

Parameters:
pool -

refresh

void refresh()
Refresh the internal state and apply the latency score strategy


getPartition

HostConnectionPoolPartition<CL> getPartition(BigInteger token)
Search for the partition that owns this token

Parameters:
token -
Returns:

getAllPools

HostConnectionPoolPartition<CL> getAllPools()
Return a partition that represents all hosts in the ring

Returns:

getPartitionCount

int getPartitionCount()
Get total number of tokens in the topology

Returns:


Copyright © 2012. All Rights Reserved.