org.objectweb.cjdbc.controller.cache.result
Class CachingGranularities

java.lang.Object
  extended byorg.objectweb.cjdbc.controller.cache.result.CachingGranularities

public class CachingGranularities
extends java.lang.Object

This class defines request cache granularities.

Version:
1.0
Author:
Emmanuel Cecchet, Nicolas Modrzyk

Field Summary
static int COLUMN
          Column granularity: entries in the cache are invalidated based on column dependencies.
static int COLUMN_UNIQUE
          Column granularity with UNIQUE queries: same as COLUMN except that UNIQUE queries that selects a single row based on a key are invalidated only when needed.
static int DATABASE
          Database granularity: entries in the cache are invalidated every time a write (INSERT/UPDATE/DELETE/DROP/...) is sent to the database.
static int TABLE
          Table granularity: entries in the cache are invalidated based on table dependencies.
 
Constructor Summary
CachingGranularities()
           
 
Method Summary
static java.lang.String getGranularityName(int cacheGrain)
          Gets the name corresponding to a cache granularity level.
static java.lang.String getGranularityXml(int cacheGrain)
          This method is needed to convert the value into the corresponding xml attribute value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATABASE

public static final int DATABASE
Database granularity: entries in the cache are invalidated every time a write (INSERT/UPDATE/DELETE/DROP/...) is sent to the database.

See Also:
Constant Field Values

TABLE

public static final int TABLE
Table granularity: entries in the cache are invalidated based on table dependencies.

See Also:
Constant Field Values

COLUMN

public static final int COLUMN
Column granularity: entries in the cache are invalidated based on column dependencies.

See Also:
Constant Field Values

COLUMN_UNIQUE

public static final int COLUMN_UNIQUE
Column granularity with UNIQUE queries: same as COLUMN except that UNIQUE queries that selects a single row based on a key are invalidated only when needed.

See Also:
Constant Field Values
Constructor Detail

CachingGranularities

public CachingGranularities()
Method Detail

getGranularityName

public static final java.lang.String getGranularityName(int cacheGrain)
Gets the name corresponding to a cache granularity level.

Parameters:
cacheGrain - cache granularity level
Returns:
the name of the granularity level

getGranularityXml

public static final java.lang.String getGranularityXml(int cacheGrain)
This method is needed to convert the value into the corresponding xml attribute value. If fails, returns noInvalidation granularity value so the xml retrieved can be used.

Parameters:
cacheGrain - cache granularity level
Returns:
the xml attribute value of the granularity level


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.