org.castor.persist.cache.distributed

Class CoherenceCache

public class CoherenceCache extends AbstractBaseCache

Tangosol Coherence implementation of Castor JDO Cache. For more details of Coherence, see http://www.tangosol.com/coherence.jsp

Version: $Revision: 1.1 $ $Date: 2005/08/04 07:31:15 $

Author: Tim Telcik

See Also: http://www.tangosol.com/coherence.jsp

Constructor Summary
CoherenceCache()
Constructor
Method Summary
voidclear()
voidclose()
booleancontains(Object key)
Indicates whether the cache holds a value object for the specified key.
booleancontainsKey(Object key)
booleancontainsValue(Object value)
Enumerationelements()
Returns an enumeration of the values in this LRU map.
SetentrySet()
Objectget(Object key)
Returns the value to which the specified key is mapped in this Map.
voidinitialize()
Initializes this cache.
booleanisEmpty()
SetkeySet()
protected StringparamString()
Objectput(Object key, Object value)
Maps the specified key to the specified value in this Map.
voidputAll(Map aMap)
Objectremove(Object key)
Removes the key (and its corresponding value) from this Map.
intsize()
StringtoString()
Returns a String representation of this object.
Collectionvalues()

Constructor Detail

CoherenceCache

public CoherenceCache()
Constructor

Method Detail

clear

public void clear()

See Also: clear

close

public void close()

contains

public boolean contains(Object key)
Indicates whether the cache holds a value object for the specified key.

See Also: Cache

containsKey

public boolean containsKey(Object key)

See Also: Cache

containsValue

public boolean containsValue(Object value)

See Also: Cache

elements

public Enumeration elements()
Returns an enumeration of the values in this LRU map. Use the Enumeration methods on the returned object to fetch the elements sequentially.

Returns: an enumeration of the values in this Map.

See Also: java.util.Enumeration

entrySet

public Set entrySet()

See Also: entrySet

get

public Object get(Object key)
Returns the value to which the specified key is mapped in this Map.

Parameters: key - a key in the Map.

Returns: the value to which the key is mapped in this Map; null if the key is not mapped to any value in this Map.

initialize

public void initialize()
Initializes this cache.

Throws: CacheAcquireException

isEmpty

public boolean isEmpty()

See Also: isEmpty

keySet

public Set keySet()

See Also: keySet

paramString

protected String paramString()

put

public Object put(Object key, Object value)
Maps the specified key to the specified value in this Map. Neither the key nor the value can be null.

The value can be retrieved by calling the get method with a key that is equal to the original key.

Parameters: key the Map key. value the value.

Returns: the previous value of the specified key in this Map, or null if it did not have one.

Throws: NullPointerException if the key or value is null.

putAll

public void putAll(Map aMap)

See Also: putAll

remove

public Object remove(Object key)
Removes the key (and its corresponding value) from this Map. This method does nothing if the key is not in the Map.

Parameters: key the key that needs to be removed.

Returns: the value to which the key had been mapped in this Map, or null if the key did not have a mapping.

size

public int size()

See Also: size

toString

public String toString()
Returns a String representation of this object.

values

public Collection values()

See Also: values

Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com