public class OSCacheProvider extends java.lang.Object implements CacheProvider
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
OSCACHE_CAPACITY
The OSCache cache capacity property suffix.
|
static java.lang.String |
OSCACHE_CRON
The OSCache CRON expression property suffix.
|
static java.lang.String |
OSCACHE_REFRESH_PERIOD
The OSCache refresh period property suffix.
|
| Constructor and Description |
|---|
OSCacheProvider() |
| Modifier and Type | Method and Description |
|---|---|
Cache |
buildCache(java.lang.String region,
java.util.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(java.util.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().
|
public static final java.lang.String OSCACHE_REFRESH_PERIOD
public static final java.lang.String OSCACHE_CRON
public static final java.lang.String OSCACHE_CAPACITY
public Cache buildCache(java.lang.String region, java.util.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()
CacheProvidernextTimestamp in interface CacheProviderpublic void start(java.util.Properties properties)
throws CacheException
start in interface CacheProviderproperties - current configuration settings.CacheExceptionpublic void stop()
stop in interface CacheProviderpublic boolean isMinimalPutsEnabledByDefault()
isMinimalPutsEnabledByDefault in interface CacheProviderCopyright © 2013. All Rights Reserved.