org.apache.jcs.access.behavior
Interface ICacheAccess

All Known Subinterfaces:
IGroupCacheAccess
All Known Implementing Classes:
CacheAccess, GroupCacheAccess

public interface ICacheAccess

Description of the Interface


Method Summary
 void destroy()
          Deprecated.  
 void destroy(java.lang.Object name)
          Deprecated.  
 java.lang.Object get(java.lang.Object name)
          Basic get method.
 ICompositeCacheAttributes getCacheAttributes()
          Gets the ICompositeCacheAttributes of the cache region
 IElementAttributes getElementAttributes()
          GetElementAttributes will return an attribute object describing the current attributes associated with the object name.
 IElementAttributes getElementAttributes(java.lang.Object name)
          Gets the elementAttributes attribute of the ICacheAccess object
 void put(java.lang.Object name, java.lang.Object obj)
          Puts and/or overides an element with the name in that region.
 void put(java.lang.Object name, java.lang.Object obj, IElementAttributes attr)
          Description of the Method
 void putSafe(java.lang.Object name, java.lang.Object obj)
          Puts in cache if an item does not exist with the name in that region.
 void remove()
          Old remove all method.
 void remove(java.lang.Object name)
          Remove an object for this key if one exists, else do nothing.
 void resetElementAttributes(IElementAttributes attr)
          ResetAttributes allows for some of the attributes of a region to be reset in particular expiration time attriubtes, time to live, default time to live and idle time, and event handlers.
 void resetElementAttributes(java.lang.Object name, IElementAttributes attr)
          Reset the attributes on the object matching this key name.
 void setCacheAttributes(ICompositeCacheAttributes cattr)
          Sets the ICompositeCacheAttributes of the cache region
 

Method Detail

get

public java.lang.Object get(java.lang.Object name)
Basic get method.

Parameters:
name -
Returns:
Object or null if not found.

putSafe

public void putSafe(java.lang.Object name,
                    java.lang.Object obj)
             throws CacheException
Puts in cache if an item does not exist with the name in that region.

Parameters:
name -
obj -
Throws:
CacheException

put

public void put(java.lang.Object name,
                java.lang.Object obj)
         throws CacheException
Puts and/or overides an element with the name in that region.

Parameters:
name -
obj -
Throws:
CacheException

put

public void put(java.lang.Object name,
                java.lang.Object obj,
                IElementAttributes attr)
         throws CacheException
Description of the Method

Parameters:
name -
obj -
attr -
Throws:
CacheException

destroy

public void destroy()
             throws CacheException
Deprecated.  

Removes an item or all items. Should be called remove.

Throws:
CacheException
See Also:
remove()

remove

public void remove()
            throws CacheException
Old remove all method.

Throws:
CacheException

destroy

public void destroy(java.lang.Object name)
             throws CacheException
Deprecated.  

The older removeall method.

Parameters:
name -
Throws:
CacheException
See Also:
remove()

remove

public void remove(java.lang.Object name)
            throws CacheException
Remove an object for this key if one exists, else do nothing.

Parameters:
name -
Throws:
CacheException

resetElementAttributes

public void resetElementAttributes(IElementAttributes attr)
                            throws CacheException
ResetAttributes allows for some of the attributes of a region to be reset in particular expiration time attriubtes, time to live, default time to live and idle time, and event handlers. The cacheloader object and attributes set as flags can't be reset with resetAttributes, the object must be destroyed and redefined to cache those parameters. Changing default settings on groups and regions will not affect existing objects. Only object loaded after the reset will use the new defaults. If no name argument is provided, the reset is applied to the region.

Parameters:
attr -
Throws:
CacheException

resetElementAttributes

public void resetElementAttributes(java.lang.Object name,
                                   IElementAttributes attr)
                            throws CacheException
Reset the attributes on the object matching this key name.

Parameters:
name -
attr -
Throws:
CacheException

getElementAttributes

public IElementAttributes getElementAttributes()
                                        throws CacheException
GetElementAttributes will return an attribute object describing the current attributes associated with the object name. If no name parameter is available, the attributes for the region will be returned. The name object must override the Object.equals and Object.hashCode methods.

Returns:
The elementAttributes value
Throws:
CacheException

getElementAttributes

public IElementAttributes getElementAttributes(java.lang.Object name)
                                        throws CacheException
Gets the elementAttributes attribute of the ICacheAccess object

Parameters:
name -
Returns:
The elementAttributes value
Throws:
CacheException

getCacheAttributes

public ICompositeCacheAttributes getCacheAttributes()
Gets the ICompositeCacheAttributes of the cache region

Returns:

setCacheAttributes

public void setCacheAttributes(ICompositeCacheAttributes cattr)
Sets the ICompositeCacheAttributes of the cache region

Parameters:
cattr - The new ICompositeCacheAttribute value


Copyright © 2002-2007 Apache Software Foundation. All Rights Reserved.