asmuts 02/01/14 22:14:12
Added: src/java/org/apache/stratum/jcs/access/behavior
ICacheAccess.java IGroupCacheAccess.java
Log:
interfaces for access classes
Revision Changes Path
1.1
jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/access/behavior/ICacheAccess.java
Index: ICacheAccess.java
===================================================================
package org.apache.stratum.jcs.access.behavior;
import java.io.*;
import org.apache.stratum.jcs.engine.control.Cache;
import org.apache.stratum.jcs.access.*;
import org.apache.stratum.jcs.access.exception.*;
import org.apache.stratum.jcs.engine.*;
import org.apache.stratum.jcs.engine.control.*;
/////////////////////////////////////////////////////////
public interface ICacheAccess {
/////////////////////////////////////////
// Static methods that should be implemented
//public static void defineRegion( String name, CacheAttributes cattr, Attributes
attr ) throws CacheException;
//public static void defineRegion( String name, CacheAttributes cattr ) throws
CacheException;
//public static void defineRegion( String name ) throws CacheException;
/////////////////////////////////////////
//public static CacheAccess getAccess( String region );
/////////////////////////////////////////
public Object get( String name );
/**
* Puts and/or overides an element with the name in that region.
*/
void put(Object name, Object obj) throws CacheException;
void put(Object name, Object obj, Attributes attr) throws CacheException;
/**
* Removes an item or all items. Should be called remove.
*/
void destroy () throws CacheException ;
void destroy (Object name) throws CacheException ;
/**
* Remove either the entire region of elements or the
* the specified element from other caches specified in
* in the cache.properties file as lateral caches.
*/
public void removeLateralDirect();
public void removeLateralDirect(Serializable key);
/**
* 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.
*/
void resetElementAttributes(Attributes attr) throws CacheException;
void resetElementAttributes(Object name, Attributes attr) throws CacheException;
/**
* GetAttributes 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.
*/
Attributes getElementAttributes() throws CacheException;
Attributes getElementAttributes(Object name) throws CacheException;
} // end interface
1.1
jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/access/behavior/IGroupCacheAccess.java
Index: IGroupCacheAccess.java
===================================================================
package org.apache.stratum.jcs.access.behavior;
import java.util.*;
import org.apache.stratum.jcs.access.CacheAccess;
import org.apache.stratum.jcs.engine.control.Cache;
import org.apache.stratum.jcs.access.*;
import org.apache.stratum.jcs.access.exception.*;
import org.apache.stratum.jcs.engine.*;
import org.apache.stratum.jcs.engine.control.*;
////////////////////////////////////////////////////////////////////
public interface IGroupCacheAccess extends ICacheAccess {
/////////////////////////////////////////
public Object getG( String name, String group );
/////////////////////////////////////////
void putG(Object key, String group, Object obj) throws CacheException;
/////////////////////////////////////////
void putG(Object key, String group, Object obj, Attributes attr) throws
CacheException;
/**
* DefineGroup is used to create a new group object. Attributes may be set on the
group. If no attributes are
* specified, the attributes of the region or group the new group is associated
with are used. If group is
* specified the new group will be associated with the group specified.
*/
void defineGroup(String name) throws CacheException;
void defineGroup(String name, Attributes attr) throws CacheException;
public Attributes getGroupAttributes(Object name) throws CacheException ;
public Enumeration getAttributeNames( Object name );
public void setAttribute(String name, String group, Object value );
public void setAttribute(String name, String group, Object value, Attributes attr
);
public Object getAttribute(String name, String group );
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>