@Test public void testClear() { DistributedMetaStorageHistoryCache histCache = new DistributedMetaStorageHistoryCache(); DistributedMetaStorageHistoryItem item0 = newHistoryItem("key0"); DistributedMetaStorageHistoryItem item1 = newHistoryItem("key1"); histCache.put(25L, item0); histCache.put(26L, item1); histCache.clear(); validate(histCache, emptyList(), 0); }
public void clear() { Arrays.fill(items, null); from = to = 0; sizeApproximation = startingVer = 0L; }
DistributedMetaStorageHistoryCache { public void clear() { Arrays.fill(items, null); from = to = 0; sizeApproximation = startingVer = 0L; } }
DistributedMetaStorageHistoryCache { public void clear() { Arrays.fill(items, null); from = to = 0; sizeApproximation = startingVer = 0L; } DistributedMetaStorageHistoryCache(); }
DistributedMetaStorageHistoryCache { public void clear() { Arrays.fill(items, null); from = to = 0; sizeApproximation = startingVer = 0L; } DistributedMetaStorageHistoryCache(); DistributedMetaStorageHistoryItem get(long ver); void put(long ver, DistributedMetaStorageHistoryItem item); DistributedMetaStorageHistoryItem removeOldest(); int size(); boolean isEmpty(); void clear(); long sizeInBytes(); DistributedMetaStorageHistoryItem[] toArray(); @Override boolean equals(Object o); }
DistributedMetaStorageHistoryCache { public void clear() { Arrays.fill(items, null); from = to = 0; sizeApproximation = startingVer = 0L; } DistributedMetaStorageHistoryCache(); DistributedMetaStorageHistoryItem get(long ver); void put(long ver, DistributedMetaStorageHistoryItem item); DistributedMetaStorageHistoryItem removeOldest(); int size(); boolean isEmpty(); void clear(); long sizeInBytes(); DistributedMetaStorageHistoryItem[] toArray(); @Override boolean equals(Object o);  }