|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.cache.infinispan.InfinispanRegionFactory
public class InfinispanRegionFactory
A RegionFactory
for Infinispan-backed cache
regions.
Field Summary | |
---|---|
static String |
COLLECTION_CACHE_RESOURCE_PROP
Name of the configuration that should be used for collection caches. |
static String |
DEF_ENTITY_RESOURCE
Default value for ENTITY_CACHE_RESOURCE_PROP . |
static String |
DEF_INFINISPAN_CONFIG_RESOURCE
Default value for INFINISPAN_CONFIG_RESOURCE_PROP . |
static String |
DEF_QUERY_RESOURCE
Default value for QUERY_CACHE_RESOURCE_PROP . |
static String |
DEF_TIMESTAMPS_RESOURCE
Default value for TIMESTAMPS_CACHE_RESOURCE_PROP . |
static String |
ENTITY_CACHE_RESOURCE_PROP
Name of the configuration that should be used for entity caches. |
static String |
INFINISPAN_CONFIG_RESOURCE_PROP
Classpath or filesystem resource containing Infinispan configurations the factory should use. |
static String |
INFINISPAN_GLOBAL_STATISTICS_PROP
|
static String |
QUERY_CACHE_RESOURCE_PROP
Name of the configuration that should be used for query caches. |
static String |
TIMESTAMPS_CACHE_RESOURCE_PROP
Name of the configuration that should be used for timestamp caches. |
Constructor Summary | |
---|---|
InfinispanRegionFactory()
Create a new instance using the default configuration. |
|
InfinispanRegionFactory(Properties props)
Create a new instance using conifguration properties in props . |
Method Summary | |
---|---|
CollectionRegion |
buildCollectionRegion(String regionName,
Properties properties,
CacheDataDescription metadata)
Build a cache region specialized for storing collection data. |
EntityRegion |
buildEntityRegion(String regionName,
Properties properties,
CacheDataDescription metadata)
Build a cache region specialized for storing entity data. |
QueryResultsRegion |
buildQueryResultsRegion(String regionName,
Properties properties)
Build a cache region specialized for storing query results |
TimestampsRegion |
buildTimestampsRegion(String regionName,
Properties properties)
Build a cache region specialized for storing update-timestamps data. |
protected org.infinispan.manager.EmbeddedCacheManager |
createCacheManager(Properties properties)
|
protected ClassLoaderAwareCache |
createCacheWrapper(org.infinispan.AdvancedCache cache)
|
protected TimestampsRegionImpl |
createTimestampsRegion(CacheAdapter cacheAdapter,
String regionName)
|
org.infinispan.manager.EmbeddedCacheManager |
getCacheManager()
|
AccessType |
getDefaultAccessType()
Get the default access type for entity and
collection regions. |
Set<String> |
getDefinedConfigurations()
|
protected TransactionManager |
getTransactionManager()
|
Map<String,TypeOverrides> |
getTypeOverrides()
Returns an unmodifiable map containing configured entity/collection type configuration overrides. |
boolean |
isMinimalPutsEnabledByDefault()
By default should we perform "minimal puts" when using this second level cache implementation? |
long |
nextTimestamp()
Generate a timestamp. |
void |
setCacheManager(org.infinispan.manager.EmbeddedCacheManager manager)
|
void |
start(Settings settings,
Properties properties)
Lifecycle callback to perform any necessary initialization of the underlying cache implementation(s). |
void |
stop()
Lifecycle callback to perform any necessary cleanup of the underlying cache implementation(s). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String INFINISPAN_CONFIG_RESOURCE_PROP
DEF_INFINISPAN_CONFIG_RESOURCE
,
Constant Field Valuespublic static final String INFINISPAN_GLOBAL_STATISTICS_PROP
public static final String ENTITY_CACHE_RESOURCE_PROP
DEF_ENTITY_RESOURCE
,
Constant Field Valuespublic static final String COLLECTION_CACHE_RESOURCE_PROP
ENTITY_CACHE_RESOURCE_PROP
,
DEF_ENTITY_RESOURCE
,
Constant Field Valuespublic static final String TIMESTAMPS_CACHE_RESOURCE_PROP
DEF_TIMESTAMPS_RESOURCE
,
Constant Field Valuespublic static final String QUERY_CACHE_RESOURCE_PROP
DEF_QUERY_RESOURCE
,
Constant Field Valuespublic static final String DEF_INFINISPAN_CONFIG_RESOURCE
INFINISPAN_CONFIG_RESOURCE_PROP
. Specifies the "infinispan-configs.xml" file in this package.
public static final String DEF_ENTITY_RESOURCE
ENTITY_CACHE_RESOURCE_PROP
.
public static final String DEF_TIMESTAMPS_RESOURCE
TIMESTAMPS_CACHE_RESOURCE_PROP
.
public static final String DEF_QUERY_RESOURCE
QUERY_CACHE_RESOURCE_PROP
.
Constructor Detail |
---|
public InfinispanRegionFactory()
public InfinispanRegionFactory(Properties props)
props
.
props
- Environmental properties; currently unused.Method Detail |
---|
public CollectionRegion buildCollectionRegion(String regionName, Properties properties, CacheDataDescription metadata) throws CacheException
buildCollectionRegion
in interface RegionFactory
regionName
- The name of the region.properties
- Configuration properties.metadata
- Information regarding the type of data to be cached
CacheException
- Indicates problems building the region.public EntityRegion buildEntityRegion(String regionName, Properties properties, CacheDataDescription metadata) throws CacheException
buildEntityRegion
in interface RegionFactory
regionName
- The name of the region.properties
- Configuration properties.metadata
- Information regarding the type of data to be cached
CacheException
- Indicates problems building the region.public QueryResultsRegion buildQueryResultsRegion(String regionName, Properties properties) throws CacheException
buildQueryResultsRegion
in interface RegionFactory
regionName
- The name of the region.properties
- Configuration properties.
CacheException
- Indicates problems building the region.public TimestampsRegion buildTimestampsRegion(String regionName, Properties properties) throws CacheException
buildTimestampsRegion
in interface RegionFactory
regionName
- The name of the region.properties
- Configuration properties.
CacheException
- Indicates problems building the region.protected TimestampsRegionImpl createTimestampsRegion(CacheAdapter cacheAdapter, String regionName)
protected TransactionManager getTransactionManager()
public boolean isMinimalPutsEnabledByDefault()
isMinimalPutsEnabledByDefault
in interface RegionFactory
public AccessType getDefaultAccessType()
RegionFactory
entity
and
collection
regions.
getDefaultAccessType
in interface RegionFactory
public long nextTimestamp()
nextTimestamp
in interface RegionFactory
public void setCacheManager(org.infinispan.manager.EmbeddedCacheManager manager)
public org.infinispan.manager.EmbeddedCacheManager getCacheManager()
public void start(Settings settings, Properties properties) throws CacheException
SessionFactoryImpl
.
start
in interface RegionFactory
settings
- The settings in effect.properties
- The defined cfg properties
CacheException
- Indicates problems starting the L2 cache impl;
considered as a sign to stop SessionFactory
building.public void stop()
SessionFactory.close()
.
stop
in interface RegionFactory
public Map<String,TypeOverrides> getTypeOverrides()
public Set<String> getDefinedConfigurations()
protected org.infinispan.manager.EmbeddedCacheManager createCacheManager(Properties properties) throws CacheException
CacheException
protected ClassLoaderAwareCache createCacheWrapper(org.infinispan.AdvancedCache cache)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |