java.lang.Object
ch.qos.logback.core.util.DefaultInvocationGate
- All Implemented Interfaces:
InvocationGate
This class serves as a gateway for invocations of a "costly" operation on a
critical execution path.
- Author:
- Ceki Gülcü
-
Field Summary
Fields inherited from interface ch.qos.logback.core.util.InvocationGate
TIME_UNAVAILABLE
-
Constructor Summary
ConstructorDescriptionDefaultInvocationGate
(long minDelayThreshold, long maxDelayThreshold, long currentTime) -
Method Summary
Modifier and TypeMethodDescriptionlong
final boolean
isTooSoon
(long currentTime) The caller of this method can decide to skip further work if the returned value is true.
-
Constructor Details
-
DefaultInvocationGate
public DefaultInvocationGate() -
DefaultInvocationGate
-
-
Method Details
-
isTooSoon
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
-
getInvocationCounter
-