MCPcopy Create free account
hub / github.com/antlr/codebuff / isExpired

Method isExpired

corpus/java/training/guava/cache/LocalCache.java:1915–1924  ·  view source on GitHub ↗

Returns true if the entry has expired.

(ReferenceEntry<K, V> entry, long now)

Source from the content-addressed store, hash-verified

1913 * Returns true if the entry has expired.
1914 */
1915 boolean isExpired(ReferenceEntry<K, V> entry, long now) {
1916 checkNotNull(entry);
1917 if (expiresAfterAccess() && (now - entry.getAccessTime() >= expireAfterAccessNanos)) {
1918 return true;
1919 }
1920 if (expiresAfterWrite() && (now - entry.getWriteTime() >= expireAfterWriteNanos)) {
1921 return true;
1922 }
1923 return false;
1924 }
1925
1926 // queues
1927

Callers 5

getLiveValueMethod · 0.95
lockedGetOrLoadMethod · 0.45
expireEntriesMethod · 0.45
getLiveEntryMethod · 0.45
getLiveValueMethod · 0.45

Calls 5

expiresAfterAccessMethod · 0.95
expiresAfterWriteMethod · 0.95
getAccessTimeMethod · 0.65
getWriteTimeMethod · 0.65
checkNotNullMethod · 0.45

Tested by

no test coverage detected