- java.lang.Object
-
- ch.qos.logback.core.util.SimpleInvocationGate
-
- All Implemented Interfaces:
InvocationGate
public class SimpleInvocationGate extends Object implements InvocationGate
An invocation gate using very simple logic.- Since:
- 1.3.6/1.4.6
-
-
Field Summary
Fields Modifier and Type Field Description static DurationDEFAULT_INCREMENT-
Fields inherited from interface ch.qos.logback.core.util.InvocationGate
TIME_UNAVAILABLE
-
-
Constructor Summary
Constructors Constructor Description SimpleInvocationGate()SimpleInvocationGate(Duration anIncrement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisTooSoon(long currentTime)The caller of this method can decide to skip further work if the returned value is true.
-
-
-
Field Detail
-
DEFAULT_INCREMENT
public static final Duration DEFAULT_INCREMENT
-
-
Constructor Detail
-
SimpleInvocationGate
public SimpleInvocationGate()
-
SimpleInvocationGate
public SimpleInvocationGate(Duration anIncrement)
-
-
Method Detail
-
isTooSoon
public boolean isTooSoon(long currentTime)
Description copied from interface:InvocationGateThe caller of this method can decide to skip further work if the returned value is true. Implementations should be able to give a reasonable answer even if current time date is unavailable.- Specified by:
isTooSoonin interfaceInvocationGate- Parameters:
currentTime- can be TIME_UNAVAILABLE (-1) to signal that time is not available- Returns:
- if true, caller should skip further work
-
-