CachePolicy
Keywords: uk.ac.ic.doc.automed.qproc.cache.CachePolicy interface

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
Interface CachePolicy

All Known Implementing Classes:
  CachePolicy2, CachePolicy3, DefaultCachePolicy

    public interface CachePolicy

CachePolicy.java

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

Field Summary
`static int` | `AD_CHECK_CACHE_FIRST`
`static int` | `AD_CHECK_CACHE_LAST`
`static int` | `AD_CHECK_CONTAINMENT`
`static int` | `CACHE_RESULT`
`static java.lang.String` | `CX_GUI`
`static java.lang.String` | `CX_QUERY_EVALUATOR`
`static java.lang.String` | `CX_QUERY_OPTIMISER`
`static java.lang.String` | `CX_QUERY_REFORMULATOR`
`static java.lang.String` | `CX_WRAPPER`
`static int` | `DO_NOT_USE_CACHE`
`static int` | `EV_AFTER_EXECUTION`
`static int` | `EV_BEFORE_EXECUTION`
`static int` | `EV_FAIL_TO_COMMUNICATE`
`static int` | `EV_REMOTE_PEER_NOT_AVAILABLE`
`static int` | `EV_SOURCE_SCHEMA_NOT_AVAILABLE`
`static int` | `PREFER_CACHE_RESULT`
`static int` | `PREFER_LIVE_DATA`
`static int` | `USE_CACHE_ONLY`
`static int` | `USE_LIVE_DATA_ONLY`

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

Field Detail

### USE_CACHE_ONLY

    static final int USE_CACHE_ONLY

See Also:
  Constant Field Values

### PREFER_CACHE_RESULT

    static final int PREFER_CACHE_RESULT

See Also:
  Constant Field Values

### PREFER_LIVE_DATA

    static final int PREFER_LIVE_DATA

See Also:
  Constant Field Values

### DO_NOT_USE_CACHE

    static final int DO_NOT_USE_CACHE

See Also:
  Constant Field Values

### CACHE_RESULT

    static final int CACHE_RESULT

See Also:
  Constant Field Values

### USE_LIVE_DATA_ONLY

    static final int USE_LIVE_DATA_ONLY

See Also:
  Constant Field Values

### AD_CHECK_CONTAINMENT

    static final int AD_CHECK_CONTAINMENT

See Also:
  Constant Field Values

### AD_CHECK_CACHE_FIRST

    static final int AD_CHECK_CACHE_FIRST

See Also:
  Constant Field Values

### AD_CHECK_CACHE_LAST

    static final int AD_CHECK_CACHE_LAST

See Also:
  Constant Field Values

### CX_GUI

    static final java.lang.String CX_GUI

See Also:
  Constant Field Values

### CX_QUERY_REFORMULATOR

    static final java.lang.String CX_QUERY_REFORMULATOR

See Also:
  Constant Field Values

### CX_QUERY_OPTIMISER

    static final java.lang.String CX_QUERY_OPTIMISER

See Also:
  Constant Field Values

### CX_QUERY_EVALUATOR

    static final java.lang.String CX_QUERY_EVALUATOR

See Also:
  Constant Field Values

### CX_WRAPPER

    static final java.lang.String CX_WRAPPER

See Also:
  Constant Field Values

### EV_BEFORE_EXECUTION

    static final int EV_BEFORE_EXECUTION

See Also:
  Constant Field Values

### EV_AFTER_EXECUTION

    static final int EV_AFTER_EXECUTION

See Also:
  Constant Field Values

### EV_FAIL_TO_COMMUNICATE

    static final int EV_FAIL_TO_COMMUNICATE

See Also:
  Constant Field Values

### EV_SOURCE_SCHEMA_NOT_AVAILABLE

    static final int EV_SOURCE_SCHEMA_NOT_AVAILABLE

See Also:
  Constant Field Values

### EV_REMOTE_PEER_NOT_AVAILABLE

    static final int EV_REMOTE_PEER_NOT_AVAILABLE

See Also:
  Constant Field Values

Method Detail

### evaluateAction

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

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

  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

    java.lang.String getName()

  Return a default name of a cache policy

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