Top Description Fields Constructors Methods
ch.qos.logback.core.util

public Class SimpleInvocationGate

extends Object
implements InvocationGate
Class Inheritance
All Implemented Interfaces
ch.qos.logback.core.util.InvocationGate
Imports
java.util.concurrent.atomic.AtomicLong, java.util.function.LongBinaryOperator, .LongUnaryOperator, .UnaryOperator

An invocation gate using very simple logic.
Since
1.3.6/1.4.6

Field Summary

Modifier and TypeField and Description
pack-priv AtomicLong
public static final Duration
pack-priv final Duration

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public boolean
isTooSoon(long
can be TIME_UNAVAILABLE (-1) to signal that time is not available
currentTime
)

Implements ch.qos.logback.core.util.InvocationGate.isTooSoon.

The caller of this method can decide to skip further work if the returned value is true.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

atomicNextback to summary
pack-priv AtomicLong atomicNext
DEFAULT_INCREMENTback to summary
public static final Duration DEFAULT_INCREMENT
incrementback to summary
pack-priv final Duration increment

Constructor Detail

SimpleInvocationGateback to summary
public SimpleInvocationGate()
SimpleInvocationGateback to summary
public SimpleInvocationGate(Duration anIncrement)

Method Detail

isTooSoonback to summary
public boolean isTooSoon(long currentTime)

Implements ch.qos.logback.core.util.InvocationGate.isTooSoon.

Doc from ch.qos.logback.core.util.InvocationGate.isTooSoon.

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.

Parameters
currentTime:long

can be TIME_UNAVAILABLE (-1) to signal that time is not available

Returns:boolean

if true, caller should skip further work

Annotations
@Override