voldemort.server.protocol.admin
Class AsyncOperationCache

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,V>
          extended by java.util.LinkedHashMap<java.lang.Integer,AsyncOperation>
              extended by voldemort.server.protocol.admin.AsyncOperationCache
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Integer,AsyncOperation>

public class AsyncOperationCache
extends java.util.LinkedHashMap<java.lang.Integer,AsyncOperation>

Extends LinkedHashMap so that only completed operations may be removed from the map.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
AsyncOperationCache(int maxSize)
          Create a new cache for background operations.
 
Method Summary
 int maxSize()
           
protected  boolean removeEldestEntry(java.util.Map.Entry<java.lang.Integer,AsyncOperation> entry)
           
 java.lang.String toString()
           
 
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, get
 
Methods inherited from class java.util.HashMap
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

AsyncOperationCache

public AsyncOperationCache(int maxSize)
Create a new cache for background operations.

Parameters:
maxSize - Maximum size of repository
Method Detail

removeEldestEntry

protected boolean removeEldestEntry(java.util.Map.Entry<java.lang.Integer,AsyncOperation> entry)
Overrides:
removeEldestEntry in class java.util.LinkedHashMap<java.lang.Integer,AsyncOperation>

maxSize

public int maxSize()

toString

public java.lang.String toString()
Overrides:
toString in class java.util.AbstractMap<java.lang.Integer,AsyncOperation>


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu