Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.connector.infinispan
Class InfinispanSource

    java.lang.Object
      org.modeshape.connector.infinispan.BaseInfinispanSource
          org.modeshape.connector.infinispan.InfinispanSource

All Implemented Interfaces:
  Serializable, Referenceable, ObjectFactory, BaseRepositorySource, RepositorySource

    @ThreadSafe
    public class InfinispanSource

extends BaseInfinispanSource

A repository source that uses an Infinispan instance to manage the content. This source is capable of using an existing `CacheContainer` or creating a new cache container. This process is controlled entirely by the JavaBean properties of the InfinispanSource instance.

This source first attempts to find an existing cache manager found in `JNDI` (or the `DefaultCacheManager` if no such manager is available) and the `cache configuration name` if supplied or the default configuration if not set.

Like other `RepositorySource` classes, instances of InfinispanCacheSource can be placed into JNDI and do support the creation of `JNDI referenceable` objects and resolution of references into JBossCacheSource.

See Also:
  Serialized Form

Field Summary
`protected static String` | `CACHE_CONFIGURATION_NAME`
`protected static String` | `CACHE_FACTORY_JNDI_NAME`

Fields inherited from class org.modeshape.connector.infinispan.BaseInfinispanSource
`ALLOW_CREATING_WORKSPACES, DEFAULT_CACHE_POLICY, DEFAULT_NAME_OF_DEFAULT_WORKSPACE, DEFAULT_RETRY_LIMIT, DEFAULT_ROOT_NODE_UUID, DEFAULT_UPDATES_ALLOWED, DEFAULT_WORKSPACE, PREDEFINED_WORKSPACE_NAMES, RETRY_LIMIT, ROOT_NODE_UUID, SOURCE_NAME, UPDATES_ALLOWED`

Constructor Summary
`InfinispanSource()` Create a repository source instance.

Method Summary
`protected org.infinispan.manager.CacheContainer` | `createCacheContainer()` Method controls how a cache container gets created.
`boolean` | `equals(Object obj)`
`String` | `getCacheConfigurationName()` Get the name of the configuration that should be used if a `cache` is to be created using the `CacheContainer` found in JNDI or the `DefaultCacheManager` if needed.
`String` | `getCacheContainerJndiName()` Get the name in JNDI of a `CacheContainer` instance that should be used to create the cache for this source.
`String` | `getCacheManagerJndiName()` Deprecated.
`Object` | `getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment)`
`Reference` | `getReference()`
`int` | `hashCode()`
`void` | `setCacheConfigurationName(String cacheConfigurationName)` Get the name of the configuration that should be used if a `cache` is to be created using the `CacheContainer` found in JNDI or the `DefaultCacheManager` if needed.
`void` | `setCacheContainerJndiName(String jndiName)` Set the name in JNDI of a `CacheContainer` instance that should be used to obtain the `Cache` instance used by this source.
`void` | `setCacheManagerJndiName(String jndiName)` Deprecated.

Methods inherited from class org.modeshape.connector.infinispan.BaseInfinispanSource
`areUpdatesAllowed, close, getCapabilities, getConnection, getContext, getDefaultCachePolicy, getDefaultWorkspaceName, getName, getObserver, getPredefinedWorkspaceNames, getRepositoryContext, getRetryLimit, getRootNodeUuid, getRootNodeUuidObject, initialize, isCreatingWorkspacesAllowed, setContext, setCreatingWorkspacesAllowed, setDefaultCachePolicy, setDefaultWorkspaceName, setName, setPredefinedWorkspaceNames, setRetryLimit, setRootNodeUuid, setUpdatesAllowed`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### CACHE_CONFIGURATION_NAME

    protected static final String CACHE_CONFIGURATION_NAME

See Also:
  Constant Field Values

### CACHE_FACTORY_JNDI_NAME

    protected static final String CACHE_FACTORY_JNDI_NAME

See Also:
  Constant Field Values

Constructor Detail

### InfinispanSource

    public InfinispanSource()

  Create a repository source instance.

Method Detail

### getCacheContainerJndiName

    public String getCacheContainerJndiName()

  Get the name in JNDI of a `CacheContainer` instance that should be used to create the cache for this source.

  This source first attempts to find a cache instance using the `CacheContainer` found in `JNDI` (or the `DefaultCacheManager` if no such manager is available) and the `cache configuration name` if supplied or the default configuration if not set.

  Returns:
    the JNDI name of the `CacheContainer` instance that should be used, or null if the `DefaultCacheManager` should be used if a cache is to be created
  See Also:
    `setCacheContainerJndiName(String)`, `getCacheConfigurationName()`

### setCacheContainerJndiName

    public void setCacheContainerJndiName(String jndiName)

  Set the name in JNDI of a `CacheContainer` instance that should be used to obtain the `Cache` instance used by this source.

  This source first attempts to find a cache instance using the `CacheContainer` found in `JNDI` (or the `DefaultCacheManager` if no such manager is available) and the `cache configuration name` if supplied or the default configuration if not set.

  Parameters:
    `jndiName` - the JNDI name of the `CacheContainer` instance that should be used, or null if the `DefaultCacheManager` should be used if a cache is to be created
  See Also:
    `setCacheContainerJndiName(String)`, `getCacheConfigurationName()`

### getCacheManagerJndiName

    @Deprecated
    public String getCacheManagerJndiName()

  Deprecated.

### setCacheManagerJndiName

    @Deprecated
    public void setCacheManagerJndiName(String jndiName)

  Deprecated.

### getCacheConfigurationName

    public String getCacheConfigurationName()

  Get the name of the configuration that should be used if a `cache` is to be created using the `CacheContainer` found in JNDI or the `DefaultCacheManager` if needed.

  This source first attempts to find a cache instance using the `CacheContainer` found in `JNDI` (or the `DefaultCacheManager` if no such manager is available) and the `cache configuration name` if supplied or the default configuration if not set.

  Returns:
    the name of the configuration that should be passed to the `CacheContainer`, or null if the default configuration should be used
  See Also:
    `setCacheConfigurationName(String)`, `getCacheContainerJndiName()`

### setCacheConfigurationName

    public void setCacheConfigurationName(String cacheConfigurationName)

  Get the name of the configuration that should be used if a `cache` is to be created using the `CacheContainer` found in JNDI or the `DefaultCacheManager` if needed.

  This source first attempts to find a cache instance using the `CacheContainer` found in `JNDI` (or the `DefaultCacheManager` if no such manager is available) and the `cache configuration name` if supplied or the default configuration if not set.

  Parameters:
    `cacheConfigurationName` - the name of the configuration that should be passed to the `CacheContainer`, or null if the default configuration should be used
  See Also:
    `getCacheConfigurationName()`, `getCacheContainerJndiName()`

### createCacheContainer

    protected org.infinispan.manager.CacheContainer createCacheContainer()

  Description copied from class: `BaseInfinispanSource`
  Method controls how a cache container gets created.

  Specified by:
    `createCacheContainer` in class `BaseInfinispanSource`
  Returns:
    an appropriate CacheContainer per implementation.

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### getReference

    public Reference getReference()

  Specified by:
    `getReference` in interface `Referenceable`
  Overrides:
    `getReference` in class `BaseInfinispanSource`

### getObjectInstance

    public Object getObjectInstance(Object obj,
                                    Name name,
                                    Context nameCtx,
                                    Hashtable<?,?> environment)
                             throws Exception

  Throws:
    `Exception`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2011 JBoss, a division of Red Hat. All Rights Reserved.