public class ConstantDeltaDelayAdjuster extends Object implements DelayAdjuster
DelayAdjuster that makes adjustments of a constant size depending on the activity
delta and threshold values.| Constructor and Description |
|---|
ConstantDeltaDelayAdjuster(long delta,
long defaultDelay,
long minDelay,
long maxDelay,
long busyThreshold)
Constructs a new
ConstantDeltaDelayAdjuster that lengthens (iff the database is busy) or shortens the
delay by the given amount. |
| Modifier and Type | Method and Description |
|---|---|
long |
determineNextDelay(long currentDelay,
long lastTaskDuration,
long load)
Determines the absolute number of milliseconds that should be used as the next timing delay for scheduling a module
invocation based on the given arguments.
|
public ConstantDeltaDelayAdjuster(long delta,
long defaultDelay,
long minDelay,
long maxDelay,
long busyThreshold)
ConstantDeltaDelayAdjuster that lengthens (iff the database is busy) or shortens the
delay by the given amount.delta - The number of milliseconds by which to adjust the current delay.defaultDelay - The number of milliseconds to return if there is not enough information to make a better decision.minDelay - The lower limit to the delay that can be returned as the next delay.maxDelay - The upper limit to the delay that can be returned as the next delay.busyThreshold - the number of transactions per second, above which the database is deemed
to be busy.public long determineNextDelay(long currentDelay,
long lastTaskDuration,
long load)
determineNextDelay in interface DelayAdjustercurrentDelay - The currently-used delay length in milliseconds - i.e., the base value to adjust.lastTaskDuration - The number of milliseconds taken to execute the previously-scheduled task.load - The load on the database in tx/s.Copyright © 2013-2016–2018 Graph Aware Limited. All rights reserved.