Constructor and Description |
---|
AdaptiveThrottler(CouchbaseConnection conn,
net.spy.memcached.protocol.binary.BinaryOperationFactory opFact,
java.net.InetSocketAddress node)
Initialize the Throttler with sensible default settings.
|
AdaptiveThrottler(CouchbaseConnection conn,
net.spy.memcached.protocol.binary.BinaryOperationFactory opFact,
java.net.InetSocketAddress node,
int normalStatsInterval,
int highStatsInterval,
int criticalStatsInterval,
int highSleep,
int criticalSleep)
Construct the AdaptiveThrottler with all possible options.
|
Modifier and Type | Method and Description |
---|---|
void |
throttle()
Throttle if needed based on the given throttle constraints.
|
public AdaptiveThrottler(CouchbaseConnection conn, net.spy.memcached.protocol.binary.BinaryOperationFactory opFact, java.net.InetSocketAddress node)
public AdaptiveThrottler(CouchbaseConnection conn, net.spy.memcached.protocol.binary.BinaryOperationFactory opFact, java.net.InetSocketAddress node, int normalStatsInterval, int highStatsInterval, int criticalStatsInterval, int highSleep, int criticalSleep)
conn
- the CouchbaseConnection to work against.opFact
- the BinaryOperationFactory to work against.node
- the node for the throttler.normalStatsInterval
- After how many operations a check should be
initialized when memory is below high_wat.highStatsInterval
- After how many operations a check should be
initialized when memory is higher than high_wat (< 10%)criticalStatsInterval
- After how many operations a check should be
initialized when memory is higher than high_wat (> 10%)highSleep
- The time (in ms) to throttle when high is reached.criticalSleep
- The time (in ms) to throttle when critical is reached.Copyright © 2006-2009 Dustin Sallings, 2009-2012 Couchbase, Inc.