diff --git a/src/main/java/build/buildfarm/instance/memory/DelegateCASMap.java b/src/main/java/build/buildfarm/instance/memory/DelegateCASMap.java index bba499d1a8..59ec80adcd 100644 --- a/src/main/java/build/buildfarm/instance/memory/DelegateCASMap.java +++ b/src/main/java/build/buildfarm/instance/memory/DelegateCASMap.java @@ -28,7 +28,7 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; -class DelegateCASMap /* implements Map */ { +class DelegateCASMap { private final ContentAddressableStorage contentAddressableStorage; private final Parser parser; private final DigestUtil digestUtil; @@ -44,7 +44,6 @@ public DelegateCASMap( digestMap = new ConcurrentHashMap<>(); } - // @Override public V put(K key, V value) throws InterruptedException { Blob blob = new Blob(value.toByteString(), digestUtil); digestMap.put(key, blob.getDigest()); @@ -52,7 +51,6 @@ public V put(K key, V value) throws InterruptedException { return value; } - // @Override public V get(Object key) { Digest valueDigest = digestMap.get(key); if (valueDigest == null) { @@ -62,48 +60,39 @@ public V get(Object key) { return expectValueType(valueDigest); } - // @Override public boolean isEmpty() { return digestMap.isEmpty(); } - // @Override public int size() { return digestMap.size(); } - // @Override public boolean containsKey(Object key) { return digestMap.get(key) != null; } - // @Override public boolean containsValue(Object value) { Preconditions.checkState(value instanceof Message); return contentAddressableStorage.contains(digestUtil.compute((Message) value)); } - // @Override public Set> entrySet() { return delegate().entrySet(); } - // @Override public Collection values() { return delegate().values(); } - // @Override public Set keySet() { return digestMap.keySet(); } - // @Override public void clear() { digestMap.clear(); } - // @Override public void putAll(Map m) throws InterruptedException { Map blobs = Maps.transformValues( m, @@ -114,7 +103,6 @@ public void putAll(Map m) throws InterruptedException { digestMap.putAll(Maps.transformValues(blobs, (blob) -> blob.getDigest())); } - // @Override public V remove(Object key) { Digest valueDigest = digestMap.remove(key); return expectValueType(valueDigest);