/** * Records the relative order in which this read was performed by adding {@code entry} to the * recency queue. At write-time, or when the queue is full past the threshold, the queue will * be drained and the entries therein processed. * * <p>Note: locked reads should use {@link #recordLockedRead}. */ void recordRead(ReferenceEntry<K, V> entry) { if (map.expiresAfterAccess()) { recordExpirationTime(entry, map.expireAfterAccessNanos); } recencyQueue.add(entry); }
/** * Records the relative order in which this read was performed by adding {@code entry} to the * recency queue. At write-time, or when the queue is full past the threshold, the queue will * be drained and the entries therein processed. * * <p>Note: locked reads should use {@link #recordLockedRead}. */ void recordRead(ReferenceEntry<K, V> entry) { if (map.expiresAfterAccess()) { recordExpirationTime(entry, map.expireAfterAccessNanos); } recencyQueue.add(entry); }
/** * Records the relative order in which this read was performed by adding {@code entry} to the * recency queue. At write-time, or when the queue is full past the threshold, the queue will * be drained and the entries therein processed. * * <p>Note: locked reads should use {@link #recordLockedRead}. */ void recordRead(ReferenceEntry<K, V> entry) { if (map.expiresAfterAccess()) { recordExpirationTime(entry, map.expireAfterAccessNanos); } recencyQueue.add(entry); }
/** * Records the relative order in which this read was performed by adding {@code entry} to the * recency queue. At write-time, or when the queue is full past the threshold, the queue will * be drained and the entries therein processed. * * <p>Note: locked reads should use {@link #recordLockedRead}. */ void recordRead(ReferenceEntry<K, V> entry) { if (map.expiresAfterAccess()) { recordExpirationTime(entry, map.expireAfterAccessNanos); } recencyQueue.add(entry); }
/** * Records the relative order in which this read was performed by adding {@code entry} to the * recency queue. At write-time, or when the queue is full past the threshold, the queue will * be drained and the entries therein processed. * * <p>Note: locked reads should use {@link #recordLockedRead}. */ void recordRead(ReferenceEntry<K, V> entry) { if (map.expiresAfterAccess()) { recordExpirationTime(entry, map.expireAfterAccessNanos); } recencyQueue.add(entry); }
/** * Records the relative order in which this read was performed by adding {@code entry} to the * recency queue. At write-time, or when the queue is full past the threshold, the queue will * be drained and the entries therein processed. * * <p>Note: locked reads should use {@link #recordLockedRead}. */ void recordRead(ReferenceEntry<K, V> entry) { if (map.expiresAfterAccess()) { recordExpirationTime(entry, map.expireAfterAccessNanos); } recencyQueue.add(entry); }
boolean expires() { return expiresAfterWrite() || expiresAfterAccess(); }
boolean expires() { return expiresAfterWrite() || expiresAfterAccess(); }
/** * Records the relative order in which this read was performed by adding {@code entry} to the * recency queue. At write-time, or when the queue is full past the threshold, the queue will * be drained and the entries therein processed. * * <p>Note: locked reads should use {@link #recordLockedRead}. */ void recordRead(ReferenceEntry<K, V> entry) { if (map.expiresAfterAccess()) { recordExpirationTime(entry, map.expireAfterAccessNanos); } recencyQueue.add(entry); }
/** * Records the relative order in which this read was performed by adding {@code entry} to the * recency queue. At write-time, or when the queue is full past the threshold, the queue will * be drained and the entries therein processed. * * <p>Note: locked reads should use {@link #recordLockedRead}. */ void recordRead(ReferenceEntry<K, V> entry) { if (map.expiresAfterAccess()) { recordExpirationTime(entry, map.expireAfterAccessNanos); } recencyQueue.add(entry); }
boolean expires() { return expiresAfterWrite() || expiresAfterAccess(); }
boolean expires() { return expiresAfterWrite() || expiresAfterAccess(); }
boolean expires() { return expiresAfterWrite() || expiresAfterAccess(); }
boolean expires() { return expiresAfterWrite() || expiresAfterAccess(); }
boolean expires() { return expiresAfterWrite() || expiresAfterAccess(); }
boolean expires() { return expiresAfterWrite() || expiresAfterAccess(); }
/** * Records the relative order in which this read was performed by adding {@code entry} to the * recency queue. At write-time, or when the queue is full past the threshold, the queue will * be drained and the entries therein processed. * * <p>Note: locked reads should use {@link #recordLockedRead}. */ void recordRead(ReferenceEntry<K, V> entry) { if (map.expiresAfterAccess()) { recordExpirationTime(entry, map.expireAfterAccessNanos); } recencyQueue.add(entry); }
/** * Updates the eviction metadata that {@code entry} was just read. This currently amounts to * adding {@code entry} to relevant eviction lists. * * <p>Note: this method should only be called under lock, as it directly manipulates the * eviction queues. Unlocked reads should use {@link #recordRead}. */ @GuardedBy("Segment.this") void recordLockedRead(ReferenceEntry<K, V> entry) { evictionQueue.add(entry); if (map.expiresAfterAccess()) { recordExpirationTime(entry, map.expireAfterAccessNanos); expirationQueue.add(entry); } }
/** * Updates the eviction metadata that {@code entry} was just read. This currently amounts to * adding {@code entry} to relevant eviction lists. * * <p>Note: this method should only be called under lock, as it directly manipulates the * eviction queues. Unlocked reads should use {@link #recordRead}. */ @GuardedBy("Segment.this") void recordLockedRead(ReferenceEntry<K, V> entry) { evictionQueue.add(entry); if (map.expiresAfterAccess()) { recordExpirationTime(entry, map.expireAfterAccessNanos); expirationQueue.add(entry); } }
/** * Updates the eviction metadata that {@code entry} was just read. This currently amounts to * adding {@code entry} to relevant eviction lists. * * <p>Note: this method should only be called under lock, as it directly manipulates the * eviction queues. Unlocked reads should use {@link #recordRead}. */ @GuardedBy("Segment.this") void recordLockedRead(ReferenceEntry<K, V> entry) { evictionQueue.add(entry); if (map.expiresAfterAccess()) { recordExpirationTime(entry, map.expireAfterAccessNanos); expirationQueue.add(entry); } }