org.hibernate.ogm.datastore.infinispan.impl
Class InfinispanDatastoreProvider

java.lang.Object
  extended by org.hibernate.ogm.datastore.infinispan.impl.InfinispanDatastoreProvider
All Implemented Interfaces:
Serializable, DatastoreProvider, org.hibernate.service.Service, org.hibernate.service.spi.Configurable, org.hibernate.service.spi.ServiceRegistryAwareService, org.hibernate.service.spi.Startable, org.hibernate.service.spi.Stoppable

public class InfinispanDatastoreProvider
extends Object
implements DatastoreProvider, org.hibernate.service.spi.Startable, org.hibernate.service.spi.Stoppable, org.hibernate.service.spi.ServiceRegistryAwareService, org.hibernate.service.spi.Configurable

Provides access to Infinispan's CacheManager; one CacheManager is needed for all caches, it can be taken via JNDI or started by this ServiceProvider; in this case it will also be stopped when no longer needed.

Author:
Sanne Grinovero, Emmanuel Bernard
See Also:
Serialized Form

Field Summary
static String CACHE_MANAGER_RESOURCE_PROP
          The key for the configuration property to define the jndi name of the cachemanager.
static String INFINISPAN_CONFIGURATION_RESOURCENAME
          The configuration property to use as key to define a custom configuration for Infinispan.
static String INFINISPAN_DEFAULT_CONFIG
           
 
Constructor Summary
InfinispanDatastoreProvider()
           
 
Method Summary
 void configure(Map configurationValues)
           
 org.infinispan.Cache getCache(String name)
           
 Class<? extends GridDialect> getDefaultDialect()
           
 org.infinispan.manager.EmbeddedCacheManager getEmbeddedCacheManager()
           
 void injectServices(org.hibernate.service.spi.ServiceRegistryImplementor serviceRegistry)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INFINISPAN_CONFIGURATION_RESOURCENAME

public static final String INFINISPAN_CONFIGURATION_RESOURCENAME
The configuration property to use as key to define a custom configuration for Infinispan.

See Also:
Constant Field Values

CACHE_MANAGER_RESOURCE_PROP

public static final String CACHE_MANAGER_RESOURCE_PROP
The key for the configuration property to define the jndi name of the cachemanager. If this property is defined, the cachemanager will be looked up via JNDI. JNDI properties passed in the form hibernate.jndi.* are used to define the context properties.

See Also:
Constant Field Values

INFINISPAN_DEFAULT_CONFIG

public static final String INFINISPAN_DEFAULT_CONFIG
See Also:
Constant Field Values
Constructor Detail

InfinispanDatastoreProvider

public InfinispanDatastoreProvider()
Method Detail

getDefaultDialect

public Class<? extends GridDialect> getDefaultDialect()
Specified by:
getDefaultDialect in interface DatastoreProvider

start

public void start()
Specified by:
start in interface org.hibernate.service.spi.Startable

getEmbeddedCacheManager

public org.infinispan.manager.EmbeddedCacheManager getEmbeddedCacheManager()

getCache

public org.infinispan.Cache getCache(String name)

stop

public void stop()
Specified by:
stop in interface org.hibernate.service.spi.Stoppable

injectServices

public void injectServices(org.hibernate.service.spi.ServiceRegistryImplementor serviceRegistry)
Specified by:
injectServices in interface org.hibernate.service.spi.ServiceRegistryAwareService

configure

public void configure(Map configurationValues)
Specified by:
configure in interface org.hibernate.service.spi.Configurable


Copyright © 2010-2012 Hibernate. All Rights Reserved.