@Test public void testEmptyCache() { DistributedMetaStorageHistoryCache histCache = new DistributedMetaStorageHistoryCache(); validate(histCache, emptyList(), 0); assertNull(histCache.get(0)); }
public DistributedMetaStorageHistoryItem get(long ver) { int size = size(); if (ver < startingVer || ver >= startingVer + size) return null; return items[(from + (int)(ver - startingVer)) & (items.length - 1)]; }
DistributedMetaStorageHistoryCache { public DistributedMetaStorageHistoryItem get(long ver) { int size = size(); if (ver < startingVer || ver >= startingVer + size) return null; return items[(from + (int)(ver - startingVer)) & (items.length - 1)]; } }
DistributedMetaStorageHistoryCache { public DistributedMetaStorageHistoryItem get(long ver) { int size = size(); if (ver < startingVer || ver >= startingVer + size) return null; return items[(from + (int)(ver - startingVer)) & (items.length - 1)]; } DistributedMetaStorageHistoryCache(); }
DistributedMetaStorageHistoryCache { public DistributedMetaStorageHistoryItem get(long ver) { int size = size(); if (ver < startingVer || ver >= startingVer + size) return null; return items[(from + (int)(ver - startingVer)) & (items.length - 1)]; } 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 DistributedMetaStorageHistoryItem get(long ver) { int size = size(); if (ver < startingVer || ver >= startingVer + size) return null; return items[(from + (int)(ver - startingVer)) & (items.length - 1)]; } 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);  }