/** * Performs routine cleanup following a read. Normally cleanup happens during writes. If cleanup * is not observed after a sufficient number of reads, try cleaning up from the read thread. */ void postReadCleanup() { if ((readCount.incrementAndGet() & DRAIN_THRESHOLD) == 0) { cleanUp(); } }
/** * Performs routine cleanup following a read. Normally cleanup happens during writes. If cleanup * is not observed after a sufficient number of reads, try cleaning up from the read thread. */ void postReadCleanup() { if ((readCount.incrementAndGet() & DRAIN_THRESHOLD) == 0) { cleanUp(); } }
/** * Performs routine cleanup following a read. Normally cleanup happens during writes. If cleanup * is not observed after a sufficient number of reads, try cleaning up from the read thread. */ void postReadCleanup() { if ((readCount.incrementAndGet() & DRAIN_THRESHOLD) == 0) { cleanUp(); } }
/** * Performs routine cleanup following a read. Normally cleanup happens during writes. If cleanup * is not observed after a sufficient number of reads, try cleaning up from the read thread. */ void postReadCleanup() { if ((readCount.incrementAndGet() & DRAIN_THRESHOLD) == 0) { cleanUp(); } }
/** * Performs routine cleanup following a read. Normally cleanup happens during writes. If cleanup * is not observed after a sufficient number of reads, try cleaning up from the read thread. */ void postReadCleanup() { if ((readCount.incrementAndGet() & DRAIN_THRESHOLD) == 0) { cleanUp(); } }
public void cleanUp() { for (Segment<?, ?> segment : segments) { segment.cleanUp(); } }
public void cleanUp() { for (Segment<?, ?> segment : segments) { segment.cleanUp(); } }
public void cleanUp() { for (Segment<?, ?> segment : segments) { segment.cleanUp(); } }
public void cleanUp() { for (Segment<?, ?> segment : segments) { segment.cleanUp(); } }
public void cleanUp() { for (Segment<?, ?> segment : segments) { segment.cleanUp(); } }
public void cleanUp() { for (Segment<?, ?> segment : segments) { segment.cleanUp(); } }
/** * Performs routine cleanup following a read. Normally cleanup happens during writes. If cleanup * is not observed after a sufficient number of reads, try cleaning up from the read thread. */ void postReadCleanup() { if ((readCount.incrementAndGet() & DRAIN_THRESHOLD) == 0) { cleanUp(); } }
/** * Performs routine cleanup following a read. Normally cleanup happens during writes. If cleanup * is not observed after a sufficient number of reads, try cleaning up from the read thread. */ void postReadCleanup() { if ((readCount.incrementAndGet() & DRAIN_THRESHOLD) == 0) { cleanUp(); } }
/** * Performs routine cleanup following a read. Normally cleanup happens during writes. If cleanup * is not observed after a sufficient number of reads, try cleaning up from the read thread. */ void postReadCleanup() { if ((readCount.incrementAndGet() & DRAIN_THRESHOLD) == 0) { cleanUp(); } }
public void cleanUp() { for (Segment<?, ?> segment : segments) { segment.cleanUp(); } }
public void cleanUp() { for (Segment<?, ?> segment : segments) { segment.cleanUp(); } }
static void checkValidState(LocalCache<?, ?> cchm) { for (Segment<?, ?> segment : cchm.segments) { segment.cleanUp(); assertFalse(segment.isLocked()); Map<?, ?> table = segmentTable(segment); // cleanup and then check count after we have a strong reference to all entries segment.cleanUp(); // under high memory pressure keys/values may be nulled out but not yet enqueued assertThat(table.size()).isAtMost(segment.count); for (Entry<?, ?> entry : table.entrySet()) { assertNotNull(entry.getKey()); assertNotNull(entry.getValue()); assertSame(entry.getValue(), cchm.get(entry.getKey())); } } checkEviction(cchm); checkExpiration(cchm); }
static void drainRecencyQueue(Segment<?, ?> segment) { segment.lock(); try { segment.cleanUp(); } finally { segment.unlock(); } }
static void expireEntries(Segment<?, ?> segment, long now) { segment.lock(); try { segment.expireEntries(now); segment.cleanUp(); } finally { segment.unlock(); } }
public void cleanUp() { for (Segment<?, ?> segment : segments) { segment.cleanUp(); } }