|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.cache.OSCacheProvider
public class OSCacheProvider
Support for OpenSymphony OSCache. This implementation assumes that identifiers have well-behaved toString() methods.
| Field Summary | |
|---|---|
static String |
OSCACHE_CAPACITY
The OSCache cache capacity property suffix. |
static String |
OSCACHE_CRON
The OSCache CRON expression property suffix. |
static String |
OSCACHE_REFRESH_PERIOD
The OSCache refresh period property suffix. |
| Constructor Summary | |
|---|---|
OSCacheProvider()
|
|
| Method Summary | |
|---|---|
Cache |
buildCache(String region,
Properties properties)
Builds a new Cache instance, and gets it's properties from the OSCache Config
which reads the properties file (oscache.properties) from the classpath. |
boolean |
isMinimalPutsEnabledByDefault()
|
long |
nextTimestamp()
Generate a timestamp |
void |
start(Properties properties)
Callback to perform any necessary initialization of the underlying cache implementation during SessionFactory construction. |
void |
stop()
Callback to perform any necessary cleanup of the underlying cache implementation during SessionFactory.close(). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String OSCACHE_REFRESH_PERIOD
public static final String OSCACHE_CRON
public static final String OSCACHE_CAPACITY
| Constructor Detail |
|---|
public OSCacheProvider()
| Method Detail |
|---|
public Cache buildCache(String region,
Properties properties)
throws CacheException
Cache instance, and gets it's properties from the OSCache Config
which reads the properties file (oscache.properties) from the classpath.
If the file cannot be found or loaded, an the defaults are used.
buildCache in interface CacheProviderregion - properties -
CacheExceptionpublic long nextTimestamp()
CacheProvider
nextTimestamp in interface CacheProvider
public void start(Properties properties)
throws CacheException
start in interface CacheProviderproperties - current configuration settings.
CacheExceptionpublic void stop()
stop in interface CacheProviderpublic boolean isMinimalPutsEnabledByDefault()
isMinimalPutsEnabledByDefault in interface CacheProvider
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||