Interface ICacheDescription
-
- All Known Implementing Classes:
AuthorityConnectionManager.AuthorityConnectionDescription,AuthorityGroupManager.AuthorityGroupDescription,BaseDescription,Jobs.JobObjectDescription,MappingConnectionManager.MappingConnectionDescription,NotificationConnectionManager.NotificationConnectionDescription,OutputConnectionManager.OutputConnectionDescription,QueryDescription,RepositoryConnectionManager.RepositoryConnectionDescription,TransformationConnectionManager.TransformationConnectionDescription
public interface ICacheDescriptionThis interface represents objects that describe cacheable objects. Implementors of this interface should ideally be immutable, if they are used to describe objects that are placed in cache. Note well: The getCriticalSectionName() method described by this interface is meant to return the name of a critical section. This should be distinguishable from other critical sections in the system; it should therefore have the classname as a component.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String_rcsid
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetCriticalSectionName()Get the critical section name for this description object.ICacheClassgetObjectClass()Get the object class for an object.longgetObjectExpirationTime(long currentTime)Obtain an expiration time for an object, in milliseconds since epoch.StringSetgetObjectKeys()Get the cache keys for an object (which may or may not exist yet in the cache).
-
-
-
Field Detail
-
_rcsid
static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
-
Method Detail
-
getObjectKeys
StringSet getObjectKeys()
Get the cache keys for an object (which may or may not exist yet in the cache). This method is called in order for cache manager to throw the correct locks.- Returns:
- the object's cache keys, or null if the object should not be cached.
-
getCriticalSectionName
java.lang.String getCriticalSectionName()
Get the critical section name for this description object. This is used to synchronize creation of the described object, and thus is used only for objects that will be cached. This method does not need to return decent results for objects that are never cached.- Returns:
- the critical section name.
-
getObjectClass
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.- Returns:
- the newly created object's object class, or null if there is no such class, and LRU behavior is not desired.
-
getObjectExpirationTime
long getObjectExpirationTime(long currentTime)
Obtain an expiration time for an object, in milliseconds since epoch. The cache manager will call this method whenever the object is being looked up, so that its expiration timestamps can be properly updated to a new time.- Parameters:
currentTime- is the time of the lookup, in milliseconds since epoch.- Returns:
- a time in milliseconds since epoch for the object to expire, or -1 if there is no expiration desired.
-
-