com.atlassian.user.impl.cache
Interface Cache


public interface Cache

The Cache abstracts the cache implementation from Confluence.


Method Summary
 java.lang.Object get(java.lang.Object key)
          Retrieve an object from this cache.
 java.util.List getKeys()
          Deprecated. this is not supported by all cache implementations and therefore will be removed from this interface in the near future.
 java.lang.String getName()
          The name of the cache uniquely identifies this cache.
 int getStatus()
          Deprecated. The idea of status is not supported by all cache implementations and therefore is likely to be moved into another interface. Do not use this.
 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.

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.

getKeys

public java.util.List getKeys()
Deprecated. this is not supported by all cache implementations and therefore will be removed from this interface in the near future.

Retrieve a list of all of the keys for objects currently stored in this cache.

Returns:
a list of keys for each of the objects in this cache.

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.


getStatus

public int getStatus()
Deprecated. The idea of status is not supported by all cache implementations and therefore is likely to be moved into another interface. Do not use this.



Copyright © 2005-2007 Atlassian Software Systems Pty Ltd. All Rights Reserved.