com.atlassian.cache
Interface Cache


public interface Cache


Method Summary
 java.lang.Object get(java.lang.Object key)
          Retrieve an object from this cache.
 java.util.Collection getKeys()
          Gets the keys of all objects currently stored in the cache.
 java.lang.String getName()
          The name of the cache, uniquely identifies this cache.
 void put(java.lang.Object key, java.lang.Object value)
          Put an object into the cache.
 void remove(java.lang.Object key)
          Remove the object identified by the key from the cache.
 void removeAll()
          Remove all of the objects from this cache.
 

Method Detail

getName

public java.lang.String getName()
The name of the cache, uniquely identifies this cache.

Returns:
the name of the cache.

getKeys

public java.util.Collection getKeys()
Gets the keys of all objects currently stored in the cache. This will return the keys in a new collection.

Returns:
a collection of Objects keys.

get

public java.lang.Object get(java.lang.Object key)
Retrieve an object from this cache.

Parameters:
key - uniquely identifying the object to be retrieved.
Returns:
the object from the cache, or null if the object is not found.

put

public void put(java.lang.Object key,
                java.lang.Object value)
Put an object into the cache. If the specified key already exists within the cache, it will be replaced by the new object.

Parameters:
key - uniquely identifying the object to be added into the cache.
value - to be cached.

remove

public void remove(java.lang.Object key)
Remove the object identified by the key from the cache. If no object can be found associated with this key then no action is taken.

Parameters:
key - uniquely identifying the object to be removed.

removeAll

public void removeAll()
Remove all of the objects from this cache.



Copyright © 2008 Atlassian Software Systems Pty Ltd. All Rights Reserved.