|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface CommonsBackedPool.INodeSuspensionStrategy
Interface used to define how nodes should be suspended for behaving badly. For example, if a node is reporting lots of corrupt connections then maybe it should be avoided for a while.
Implementations should indicate if a node is suspended by ensuring that
CommonsBackedPool.INodeSuspensionState.isSuspended()
returns true
until the node should no longer be considered suspended.
Any state required to determine if a node should be suspended should be stored in the nodes
PooledNode.getSuspensionState()
. Note that the
suspension state may be null if the node has not been evaluated before.
Also note that the evaluate(CommonsBackedPool, PooledNode)
will be called by the scheduled tasks thread even when the node is currently suspended.
Method Summary | |
---|---|
boolean |
evaluate(CommonsBackedPool pool,
org.scale7.cassandra.pelops.pool.PooledNode node)
Called for each node in the pool by the pools background thread. |
Method Detail |
---|
boolean evaluate(CommonsBackedPool pool, org.scale7.cassandra.pelops.pool.PooledNode node)
pool
- the pool (just in case you need it)node
- the node to evaluate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |