Top Description Methods
com.github.benmanes.caffeine.cache

public Interface Ticker

Additional top-level classes in compilation unit: SystemTicker, DisabledTicker.

Known Direct Implementers
com.github.benmanes.caffeine.cache.SystemTicker, com.github.benmanes.caffeine.cache.DisabledTicker
Annotations
@FunctionalInterface

A time source that returns a time value representing the number of nanoseconds elapsed since some fixed but arbitrary point in time.
Author
[email protected] (Ben Manes)

Method Summary

Modifier and TypeMethod and Description
public static Ticker

Returns:

a ticker that always returns 0
disabledTicker
()

Returns a ticker that always returns 0.

public long

Returns:

the number of nanoseconds elapsed since this ticker's fixed point of reference
read
()

Returns the number of nanoseconds elapsed since this ticker's fixed point of reference.

public static Ticker

Returns:

a ticker that reads the current time using System#nanoTime
systemTicker
()

Returns a ticker that reads the current time using System#nanoTime.

Method Detail

disabledTickerback to summary
public static Ticker disabledTicker()

Returns a ticker that always returns 0.

Returns:Ticker

a ticker that always returns 0

readback to summary
public long read()

Returns the number of nanoseconds elapsed since this ticker's fixed point of reference.

Returns:long

the number of nanoseconds elapsed since this ticker's fixed point of reference

systemTickerback to summary
public static Ticker systemTicker()

Returns a ticker that reads the current time using System#nanoTime.

Returns:Ticker

a ticker that reads the current time using System#nanoTime