Class BaseDescription
- java.lang.Object
-
- org.apache.manifoldcf.core.cachemanager.BaseDescription
-
- All Implemented Interfaces:
ICacheDescription
- Direct Known Subclasses:
AuthorityConnectionManager.AuthorityConnectionDescription,AuthorityGroupManager.AuthorityGroupDescription,Jobs.JobObjectDescription,MappingConnectionManager.MappingConnectionDescription,NotificationConnectionManager.NotificationConnectionDescription,OutputConnectionManager.OutputConnectionDescription,QueryDescription,RepositoryConnectionManager.RepositoryConnectionDescription,TransformationConnectionManager.TransformationConnectionDescription
public abstract class BaseDescription extends java.lang.Object implements ICacheDescription
This is the base class for cache object descriptions. The base class sets up LRU behavior based on parameters in a configuration file, and also bases expiration on the same class picture.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classBaseDescription.LocalCacheClassThis is a cache class implementation that gets expiration and LRU info from .ini variables.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String_rcsidprotected ICacheClasscacheClassprotected static intMAX_VALUE
-
Constructor Summary
Constructors Constructor Description BaseDescription(java.lang.String objectClassName)BaseDescription(java.lang.String objectClassName, int maxLRUCount)BaseDescription(java.lang.String objectClassName, IThreadContext threadContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ICacheClassgetObjectClass()Get the object class for an object.longgetObjectExpirationTime(long currentTime)Obtain an expiration time for an object, in milliseconds since epoch.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.manifoldcf.core.interfaces.ICacheDescription
getCriticalSectionName, getObjectKeys
-
-
-
-
Field Detail
-
_rcsid
public static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
cacheClass
protected ICacheClass cacheClass
-
MAX_VALUE
protected static final int MAX_VALUE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BaseDescription
public BaseDescription(java.lang.String objectClassName)
-
BaseDescription
public BaseDescription(java.lang.String objectClassName, IThreadContext threadContext) throws ManifoldCFException- Throws:
ManifoldCFException
-
BaseDescription
public BaseDescription(java.lang.String objectClassName, int maxLRUCount)
-
-
Method Detail
-
getObjectClass
public ICacheClass getObjectClass()
Get the object class for an object. The object class is used to determine the group of objects treated in the same LRU manner.- Specified by:
getObjectClassin interfaceICacheDescription- Returns:
- the newly created object's object class, or null if there is no such class, and LRU behavior is not desired.
-
getObjectExpirationTime
public long getObjectExpirationTime(long currentTime)
Obtain an expiration time for an object, in milliseconds since epoch. The cache manager will call this method for all objects that are being operated on, so that their expiration timestamps get properly updated to a new time.- Specified by:
getObjectExpirationTimein interfaceICacheDescription- Parameters:
currentTime- is the time of the lookup, in milliseconds since epoch.- Returns:
- a time in milliseconds for the object to expire, or -1 if there is no expiration desired.
-
-