Package ch.qos.logback.core.util
Class FixedDelay
- java.lang.Object
-
- ch.qos.logback.core.util.FixedDelay
-
- All Implemented Interfaces:
DelayStrategy
public class FixedDelay extends java.lang.Object implements DelayStrategy
A defaultDelayStrategythat implements a simple fixed delay.- Since:
- 1.1.0
-
-
Constructor Summary
Constructors Constructor Description FixedDelay(int delay)Initialize a newFixedDelaywith fixed delay value given bydelayparameter.FixedDelay(long initialDelay, long subsequentDelay)Initialize a newFixedDelaywith a giveninitialDelayandsubsequentDelay.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longnextDelay()The value computed by thisDelayStrategyfor the next delay.
-
-
-
Constructor Detail
-
FixedDelay
public FixedDelay(long initialDelay, long subsequentDelay)Initialize a newFixedDelaywith a giveninitialDelayandsubsequentDelay.- Parameters:
initialDelay- value for the initial delaysubsequentDelay- value for all other delays
-
FixedDelay
public FixedDelay(int delay)
Initialize a newFixedDelaywith fixed delay value given bydelayparameter.- Parameters:
delay- value for all delays
-
-
Method Detail
-
nextDelay
public long nextDelay()
The value computed by thisDelayStrategyfor the next delay.- Specified by:
nextDelayin interfaceDelayStrategy- Returns:
- a delay value
-
-