Package ch.qos.logback.core.util
Class SimpleInvocationGate
java.lang.Object
ch.qos.logback.core.util.SimpleInvocationGate
- All Implemented Interfaces:
InvocationGate
An invocation gate using very simple logic.
- Since:
- 1.3.6/1.4.6
-
Field Summary
FieldsFields inherited from interface ch.qos.logback.core.util.InvocationGate
TIME_UNAVAILABLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
isTooSoon
(long currentTime) The caller of this method can decide to skip further work if the returned value is true.
-
Field Details
-
DEFAULT_INCREMENT
public static final int DEFAULT_INCREMENT- See Also:
-
-
Constructor Details
-
SimpleInvocationGate
public SimpleInvocationGate() -
SimpleInvocationGate
public SimpleInvocationGate(int anIncrement)
-
-
Method Details
-
isTooSoon
public boolean isTooSoon(long currentTime) Description copied from interface:InvocationGate
The 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:
isTooSoon
in interfaceInvocationGate
- Parameters:
currentTime
- can be TIME_UNAVAILABLE (-1) to signal that time is not available- Returns:
- if true, caller should skip further work
-