DefaultCachePolicy
Keywords: uk.ac.ic.doc.automed.qproc.cache.DefaultCachePolicy class

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

## uk.ac.ic.doc.automed.qproc.cache
Class DefaultCachePolicy

    java.lang.Object
      uk.ac.ic.doc.automed.qproc.cache.DefaultCachePolicy

All Implemented Interfaces:
  CachePolicy

Direct Known Subclasses:
  CachePolicy2, CachePolicy3

    public class DefaultCachePolicy

extends java.lang.Object
implements CachePolicy

CachePolicy.java Prefer the cache

Author:
  Duc M Le dmle@doc.ic.ac.uk

Field Summary
`static int` | `DEF_WRAPPER_ACTION`

Fields inherited from interface uk.ac.ic.doc.automed.qproc.cache.CachePolicy
`AD_CHECK_CACHE_FIRST, AD_CHECK_CACHE_LAST, AD_CHECK_CONTAINMENT, CACHE_RESULT, CX_GUI, CX_QUERY_EVALUATOR, CX_QUERY_OPTIMISER, CX_QUERY_REFORMULATOR, CX_WRAPPER, DO_NOT_USE_CACHE, EV_AFTER_EXECUTION, EV_BEFORE_EXECUTION, EV_FAIL_TO_COMMUNICATE, EV_REMOTE_PEER_NOT_AVAILABLE, EV_SOURCE_SCHEMA_NOT_AVAILABLE, PREFER_CACHE_RESULT, PREFER_LIVE_DATA, USE_CACHE_ONLY, USE_LIVE_DATA_ONLY`

Constructor Summary
`DefaultCachePolicy()` Creates a new instance of CachePolicy

Method Summary
`int` | `evaluateAction(java.lang.String context, int eventType, QueryProcessorConfiguration qpc)` Evalute a set of of conditions to produce the appropriate cache actions
`java.lang.String` | `getName()` Return a default name of a cache policy

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEF_WRAPPER_ACTION

    public static final int DEF_WRAPPER_ACTION

See Also:
  Constant Field Values

Constructor Detail

### DefaultCachePolicy

    public DefaultCachePolicy()

  Creates a new instance of CachePolicy

Method Detail

### evaluateAction

    public int evaluateAction(java.lang.String context,
                              int eventType,
                              QueryProcessorConfiguration qpc)

  Evalute a set of of conditions to produce the appropriate cache actions

  Specified by:
    `evaluateAction` in interface `CachePolicy`
  Parameters:
    `context` - The context at which the a cache action is to be produced
    `eventType` - The event (in the specified context) which desires a cache action
    `qpc` - the `QueryProcessorConfiguration` class which provides user-specified parameters for the evaluation
  Returns:
    int the action code (see the public constants of this class)

### getName

    public java.lang.String getName()

  Description copied from interface: `CachePolicy`
  Return a default name of a cache policy

  Specified by:
    `getName` in interface `CachePolicy`

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