ch.qos.logback.core.util

## Class DefaultInvocationGate

- java.lang.Object
- - ch.qos.logback.core.util.DefaultInvocationGate

All Implemented Interfaces:
  InvocationGate

    public class DefaultInvocationGate
    extends Object
    implements 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

Constructors
Constructor and Description
`DefaultInvocationGate()`
`DefaultInvocationGate(long minDelayThreshold, long maxDelayThreshold, long currentTime)`

### Method Summary

All Methods Instance Methods Concrete Methods
`long` `getInvocationCounter()`
`boolean` `isTooSoon(long currentTime)` The caller of this method can decide to skip further work if the returned value is true.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DefaultInvocationGate

    public DefaultInvocationGate()

#### DefaultInvocationGate

    public DefaultInvocationGate(long minDelayThreshold,
                                 long maxDelayThreshold,
                                 long currentTime)

### Method Detail

#### isTooSoon

    public final 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 interface `InvocationGate`
Returns:
  if true, caller should skip further work

#### getInvocationCounter

    public long getInvocationCounter()