|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.autonomy.aci.ActionCachingDetails
The ActionCachingDetails
class is used to define how long the results of a
particular ACI action should be cached for.
Constructor Summary | |
ActionCachingDetails(java.lang.String sAction,
java.util.ArrayList alInvalidatedByActions,
long lnCachingTime,
java.lang.String sUniqueParameter)
Define the caching properties for a given action. |
Method Summary | |
java.lang.String |
getAction()
Read the action whose caching details this object represents. |
long |
getCachingTime()
Read the caching time set for this action. |
java.util.ArrayList |
getInvalidatedByActions()
Read the list of actions which can invalidate a cached response from this action. |
java.lang.String |
getUniqueParameter()
Read the name of the unique parameter for this action. |
void |
setAction(java.lang.String sAction)
Set the action whose the caching details being defined. |
void |
setCachingTime(long lnCachingTimeMS)
The time that a response from this action should be maintained in the cached. |
void |
setInvalidatedByActions(java.util.ArrayList alInvalidatedByActions)
Define the list of actions which can invalidated a cached response from this action. |
void |
setMaxCachingTime(long lnMaxCachingTimeMS)
Set the maximum time a response for this action should be maintained in the cache. |
void |
setUniqueParameter(java.lang.String sUniqueParameter)
The parameter whose value must match that set in an invalidating action for this action to be invalidated. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ActionCachingDetails(java.lang.String sAction, java.util.ArrayList alInvalidatedByActions, long lnCachingTime, java.lang.String sUniqueParameter)
For example, you might wish to cache the result of a 'UserReadAgentList' action for 1 minute for speed when reading a user's agent list multiple times.
However, when the command 'agentadd' is sent, you would want to remove all the results for 'UserReadAgentList' actions from the cache, for that user, so that the updated agent information becomes available.
You would set up the caching information for this action using:
ArrayList alInvalidatingActions = new ArrayList(); alInvalidatingActions.add("AgentAdd"); AciCache.setCachingDetailsForAction(new ActionCachingDetails("UserReadAgentList", alInvalidatingActions, 60000, "username"));
sAction
- the action for whose results the caching details are being set. Case insensitive.alInvalidatedByActions
- the String
names of the actions which can invalidate this
action's cached results. Can be null
in which case only the caching time
determines how long a result remains in the cache.lnCachingTime
- the maximum time for which this action's cached results can remain in the cache.
If lnCachingTime < 0 or lnCachingTime > the cache's maximum caching time, the cache's maximum
caching time will be used.sUniqueParameter
- the name of the parameter whose values in the cached and invalidating actions
must match for a result to be removed from the cache. In the example above, this is the
'username' parameter as we only want an AgentAdd command to invalidate the UserReadAgentList
result for the user with the new agent, not all the users stored in IDOL. Can be null
.Method Detail |
public void setAction(java.lang.String sAction)
sAction
- the action.public java.lang.String getAction()
public void setUniqueParameter(java.lang.String sUniqueParameter)
null
.
sUniqueParameter
- the name of the unique parameter.public java.lang.String getUniqueParameter()
public void setMaxCachingTime(long lnMaxCachingTimeMS)
setCachingTime
.
public void setCachingTime(long lnCachingTimeMS)
lnCachingTimeMS
- the caching time for this action in millisecond.public long getCachingTime()
public void setInvalidatedByActions(java.util.ArrayList alInvalidatedByActions)
alInvalidatedByActions
- an ArrayList
of String
s giving all the
invalidating actions.public java.util.ArrayList getInvalidatedByActions()
ArrayList
of String
s giving all the invalidating actions.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |