Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.autonomy.aci
Class ActionCachingDetails

    java.lang.Object
      com.autonomy.aci.ActionCachingDetails

public class ActionCachingDetails
extends java.lang.Object

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

### ActionCachingDetails

    public ActionCachingDetails(java.lang.String sAction,
                                java.util.ArrayList alInvalidatedByActions,
                                long lnCachingTime,
                                java.lang.String sUniqueParameter)

  Define the caching properties for a given action.

  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"));

Parameters:
  `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

### setAction

    public void setAction(java.lang.String sAction)

  Set the action whose the caching details being defined.

  Parameters:
    `sAction` - the action.

### getAction

    public java.lang.String getAction()

  Read the action whose caching details this object represents.

  Returns:
    the action.

### setUniqueParameter

    public void setUniqueParameter(java.lang.String sUniqueParameter)

  The parameter whose value must match that set in an invalidating action for this action to be invalidated. Can be (and in most cases, is) `null`.

  Parameters:
    `sUniqueParameter` - the name of the unique parameter.

### getUniqueParameter

    public java.lang.String getUniqueParameter()

  Read the name of the unique parameter for this action.

  Returns:
    the name of the unique parameter.

### setMaxCachingTime

    public void setMaxCachingTime(long lnMaxCachingTimeMS)

  Set the maximum time a response for this action should be maintained in the cache. This overides the caching time set with `setCachingTime`.

### setCachingTime

    public void setCachingTime(long lnCachingTimeMS)

  The time that a response from this action should be maintained in the cached.

  Parameters:
    `lnCachingTimeMS` - the caching time for this action in millisecond.

### getCachingTime

    public long getCachingTime()

  Read the caching time set for this action.

  Returns:
    the caching time.

### setInvalidatedByActions

    public void setInvalidatedByActions(java.util.ArrayList alInvalidatedByActions)

  Define the list of actions which can invalidated a cached response from this action.

  Parameters:
    `alInvalidatedByActions` - an `ArrayList` of `String`s giving all the invalidating actions.

### getInvalidatedByActions

    public java.util.ArrayList getInvalidatedByActions()

  Read the list of actions which can invalidate a cached response from this action.

  Returns:
    an `ArrayList` of `String`s giving all the invalidating actions.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD