@Test public void destroy() { long now = 3000; CyclicBuffer<Object> cb = tracker.getOrCreate(key, now); cb.add(new Object()); assertEquals(1, cb.length()); tracker.endOfLife(key); now += CyclicBufferTracker.LINGERING_TIMEOUT + 10; tracker.removeStaleComponents(now); assertEquals(0, tracker.liveKeysAsOrderedList().size()); assertEquals(0, tracker.getComponentCount()); assertEquals(0, cb.length()); }
List<String> liveKeysAsOrderedList() { return new ArrayList<String>(liveMap.keySet()); }
CyclicBufferTracker extends AbstractComponentTracker<CyclicBuffer<E>> { List<String> liveKeysAsOrderedList() { return new ArrayList<String>(liveMap.keySet()); } }
CyclicBufferTracker extends AbstractComponentTracker<CyclicBuffer<E>> { List<String> liveKeysAsOrderedList() { return new ArrayList<String>(liveMap.keySet()); } CyclicBufferTracker(); }
CyclicBufferTracker extends AbstractComponentTracker<CyclicBuffer<E>> { List<String> liveKeysAsOrderedList() { return new ArrayList<String>(liveMap.keySet()); } CyclicBufferTracker(); int getBufferSize(); void setBufferSize(int bufferSize); }
CyclicBufferTracker extends AbstractComponentTracker<CyclicBuffer<E>> { List<String> liveKeysAsOrderedList() { return new ArrayList<String>(liveMap.keySet()); } CyclicBufferTracker(); int getBufferSize(); void setBufferSize(int bufferSize);  }