org.modeshape.connector.infinispan
Class RemoteInfinispanSource

java.lang.Object
  extended by org.modeshape.connector.infinispan.BaseInfinispanSource
      extended by org.modeshape.connector.infinispan.RemoteInfinispanSource
All Implemented Interfaces:
Serializable, Referenceable, ObjectFactory, BaseRepositorySource, RepositorySource

@ThreadSafe
public class RemoteInfinispanSource
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 attempts to use the RemoteCacheManager with the supplied server list.

Like other RepositorySource classes, instances of RemoteInfinispanCacheSource 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 INFINISPAN_SERVER_LIST
           
 
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
RemoteInfinispanSource()
           
 
Method Summary
protected  org.infinispan.manager.CacheContainer createCacheContainer()
          Method controls how a cache container gets created.
 boolean equals(Object obj)
          
 Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment)
          
 Reference getReference()
          
 String getRemoteInfinispanServerList()
          Get the list of remote servers that make up the Infinispan cluster.
 int hashCode()
           
 void setRemoteInfinispanServerList(String remoteInfinispanServerList)
          Set the list of remote servers that make up the Infinispan cluster.
 
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

INFINISPAN_SERVER_LIST

protected static final String INFINISPAN_SERVER_LIST
See Also:
Constant Field Values
Constructor Detail

RemoteInfinispanSource

public RemoteInfinispanSource()
Method Detail

getRemoteInfinispanServerList

public String getRemoteInfinispanServerList()
Get the list of remote servers that make up the Infinispan cluster. The servers must be Infinispan HotRod servers. The list must be in the appropriate format of host:port[;host:port...] that would be used when defining an Infinispan RemoteCacheManager instance. If the value is missing, localhost:11311 is assumed.

Returns:
the names of the remote servers

setRemoteInfinispanServerList

public void setRemoteInfinispanServerList(String remoteInfinispanServerList)
Set the list of remote servers that make up the Infinispan cluster. The servers must be Infinispan HotRod servers. The list must be in the appropriate format of host:port[;host:port...] that would be used when defining an Infinispan RemoteCacheManager instance. If the value is missing, localhost:11311 is assumed.

Parameters:
remoteInfinispanServerList - the server list in appropriate server:port;server2:port2 format.

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.

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

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


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