Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

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

List of all members.

Static Public Member Functions

final String getGranularityName (int cacheGrain)
final String getGranularityXml (int cacheGrain)

Static Public Attributes

final int DATABASE = 0
final int TABLE = 1
final int COLUMN = 2
final int COLUMN_UNIQUE = 3

Detailed Description

This class defines request cache granularities.

Author:
Emmanuel Cecchet

Nicolas Modrzyk

Version:
1.0

Definition at line 36 of file CachingGranularities.java.


Member Function Documentation

final String org.objectweb.cjdbc.controller.cache.result.CachingGranularities.getGranularityName int  cacheGrain  )  [static]
 

Gets the name corresponding to a cache granularity level.

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

Definition at line 69 of file CachingGranularities.java.

00070   {
00071     switch (cacheGrain)
00072     {
00073       case DATABASE :
00074         return "DATABASE";
00075       case TABLE :
00076         return "TABLE";
00077       case COLUMN :
00078         return "COLUMN";
00079       case COLUMN_UNIQUE :
00080         return "COLUMN_UNIQUE";
00081       default :
00082         return "UNSUPPORTED";
00083     }
00084   }

final String org.objectweb.cjdbc.controller.cache.result.CachingGranularities.getGranularityXml int  cacheGrain  )  [static]
 

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

Definition at line 94 of file CachingGranularities.java.

00095   {
00096     switch (cacheGrain)
00097     {
00098       case DATABASE :
00099         return DatabasesXmlTags.VAL_database;
00100       case TABLE :
00101         return DatabasesXmlTags.VAL_table;
00102       case COLUMN :
00103         return DatabasesXmlTags.VAL_column;
00104       case COLUMN_UNIQUE :
00105         return DatabasesXmlTags.VAL_columnUnique;
00106       default :
00107         return DatabasesXmlTags.VAL_noInvalidation;
00108     }
00109   }


Member Data Documentation

final int org.objectweb.cjdbc.controller.cache.result.CachingGranularities.COLUMN = 2 [static]
 

Column granularity: entries in the cache are invalidated based on column dependencies.

Definition at line 54 of file CachingGranularities.java.

final int org.objectweb.cjdbc.controller.cache.result.CachingGranularities.COLUMN_UNIQUE = 3 [static]
 

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.

Definition at line 61 of file CachingGranularities.java.

final int org.objectweb.cjdbc.controller.cache.result.CachingGranularities.DATABASE = 0 [static]
 

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

Definition at line 42 of file CachingGranularities.java.

final int org.objectweb.cjdbc.controller.cache.result.CachingGranularities.TABLE = 1 [static]
 

Table granularity: entries in the cache are invalidated based on table dependencies.

Definition at line 48 of file CachingGranularities.java.


The documentation for this class was generated from the following file:
Generated on Mon Apr 11 22:03:28 2005 for C-JDBC by  doxygen 1.3.9.1