public EntryCache getEntryCache(ManagedLedgerImpl ml) { if (maxSize == 0) { // Cache is disabled return new EntryCacheDisabled(ml); } EntryCache newEntryCache = new EntryCacheImpl(this, ml); EntryCache currentEntryCache = caches.putIfAbsent(ml.getName(), newEntryCache); if (currentEntryCache != null) { return currentEntryCache; } else { return newEntryCache; } }
public EntryCache getEntryCache(ManagedLedgerImpl ml) { if (maxSize == 0) { // Cache is disabled return new EntryCacheDisabled(ml); } EntryCache newEntryCache = new EntryCacheImpl(this, ml); EntryCache currentEntryCache = caches.putIfAbsent(ml.getName(), newEntryCache); if (currentEntryCache != null) { return currentEntryCache; } else { return newEntryCache; } }
public EntryCache getEntryCache(ManagedLedgerImpl ml) { if (maxSize == 0) { // Cache is disabled return new EntryCacheDisabled(ml); } EntryCache newEntryCache = new EntryCacheImpl(this, ml); EntryCache currentEntryCache = caches.putIfAbsent(ml.getName(), newEntryCache); if (currentEntryCache != null) { return currentEntryCache; } else { return newEntryCache; } }
@Override public int compareTo(EntryCache other) { return Longs.compare(getSize(), other.getSize()); }
@Override public int compareTo(EntryCache other) { return Longs.compare(getSize(), other.getSize()); }
@Override public int compareTo(EntryCache other) { return Longs.compare(getSize(), other.getSize()); }