uk.ac.ic.doc.automed.qproc.cache
Class CachePolicy3

java.lang.Object
  extended by uk.ac.ic.doc.automed.qproc.cache.DefaultCachePolicy
      extended by uk.ac.ic.doc.automed.qproc.cache.CachePolicy3
All Implemented Interfaces:
CachePolicy

public class CachePolicy3
extends DefaultCachePolicy

CachePolicy3.java Only use the case, do not cache at GUI

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
CachePolicy3()
          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

CachePolicy3

public CachePolicy3()
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
Overrides:
evaluateAction in class DefaultCachePolicy
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
Overrides:
getName in class DefaultCachePolicy