org.infinispan.config
Class GlobalConfiguration

java.lang.Object
  extended by org.infinispan.config.AbstractConfigurationBean
      extended by org.infinispan.config.GlobalConfiguration
All Implemented Interfaces:
Serializable, Cloneable, CloneableConfigurationComponent, JAXBUnmarshallable

public class GlobalConfiguration
extends AbstractConfigurationBean

Configuration component that encapsulates the global configuration.

A default instance of this bean takes default values for each attribute. Please see the individual setters for details of what these defaults are.

Since:
4.0
Author:
Manik Surtani, Vladimir Blagojevic, Mircea.Markus@jboss.com, Galder ZamarreƱo
See Also:
Configuration reference, Serialized Form

Nested Class Summary
static interface GlobalConfiguration.ExecutorFactoryConfig<T>
          Configures executor factory.
static class GlobalConfiguration.ExecutorFactoryType
           
static interface GlobalConfiguration.ExternalizersConfig
          ExternalizersConfig.
static class GlobalConfiguration.ExternalizersType
          Configures custom marshallers.
static class GlobalConfiguration.FactoryClassWithPropertiesType
           
static interface GlobalConfiguration.GlobalJmxStatisticsConfig
          Configures whether global statistics are gathered and reported via JMX for all caches under this cache manager.
static class GlobalConfiguration.GlobalJmxStatisticsType
          This element specifies whether global statistics are gathered and reported via JMX for all caches under this cache manager.
static class GlobalConfiguration.ScheduledExecutorFactoryType
           
static interface GlobalConfiguration.SerializationConfig
          Configures serialization and marshalling settings.
static class GlobalConfiguration.SerializationType
          Serialization and marshalling settings.
static class GlobalConfiguration.ShutdownHookBehavior
          Behavior of the JVM shutdown hook registered by the cache
static class GlobalConfiguration.ShutdownType
          This element specifies behavior when the JVM running the cache instance shuts down.
static interface GlobalConfiguration.TransportConfig
          Configures the transport used for network communications across the cluster.
static class GlobalConfiguration.TransportType
          This element configures the transport used for network communications across the cluster.
 
Field Summary
static short DEFAULT_MARSHALL_VERSION
          Default replication version, from Version.getVersionShort().
 
Fields inherited from class org.infinispan.config.AbstractConfigurationBean
EMPTY_PROPERTIES, log, overriddenConfigurationElements
 
Constructor Summary
GlobalConfiguration()
           
 
Method Summary
 void accept(ConfigurationBeanVisitor v)
           
 void addExternalizer(Externalizer... externalizers)
          Helper method that allows for quick registration of Externalizer implementations.
 void addExternalizer(int id, Externalizer externalizer)
          Helper method that allows for quick registration of an Externalizer implementation alongside its corresponding identifier.
 GlobalConfiguration clone()
           
 GlobalConfiguration.ExecutorFactoryConfig<ExecutorFactory> configureAsyncListenerExecutor()
           
 GlobalConfiguration.ExecutorFactoryConfig<ExecutorFactory> configureAsyncTransportExecutor()
           
 GlobalConfiguration.ExecutorFactoryConfig<ScheduledExecutorFactory> configureEvictionScheduledExecutor()
           
 GlobalConfiguration.GlobalJmxStatisticsConfig configureGlobalJmxStatistics()
           
 GlobalConfiguration.ExecutorFactoryConfig<ScheduledExecutorFactory> configureReplicationQueueScheduledExecutor()
           
 GlobalConfiguration.SerializationConfig configureSerialization()
           
 GlobalConfiguration.TransportConfig configureTransport()
           
 boolean equals(Object o)
           
 String getAsyncListenerExecutorFactoryClass()
           
 Properties getAsyncListenerExecutorProperties()
           
 String getAsyncTransportExecutorFactoryClass()
           
 Properties getAsyncTransportExecutorProperties()
           
 String getCacheManagerName()
           
static GlobalConfiguration getClusteredDefault()
          Helper method that gets you a default constructed GlobalConfiguration, preconfigured to use the default clustering stack.
 String getClusterName()
           
 long getDistributedSyncTimeout()
           
 String getEvictionScheduledExecutorFactoryClass()
           
 Properties getEvictionScheduledExecutorProperties()
           
 GlobalConfiguration.ExternalizersType getExternalizersType()
           
 String getJmxDomain()
           
 String getMachineId()
           
 String getMarshallerClass()
           
 short getMarshallVersion()
           
 String getMarshallVersionString()
           
 String getMBeanServerLookup()
           
 MBeanServerLookup getMBeanServerLookupInstance()
           
 Properties getMBeanServerProperties()
           
static GlobalConfiguration getNonClusteredDefault()
          Helper method that gets you a default constructed GlobalConfiguration, preconfigured for use in LOCAL mode
 String getRackId()
           
 String getReplicationQueueScheduledExecutorFactoryClass()
           
 Properties getReplicationQueueScheduledExecutorProperties()
           
 GlobalConfiguration.ShutdownHookBehavior getShutdownHookBehavior()
           
 String getSiteId()
           
 String getTransportClass()
           
 String getTransportNodeName()
           
 Properties getTransportProperties()
           
protected  boolean hasComponentStarted()
          Tests whether the component this configuration bean intents to configure has already started.
 int hashCode()
           
 boolean hasTopologyInfo()
           
 boolean isAllowDuplicateDomains()
           
 boolean isExposeGlobalJmxStatistics()
           
 boolean isStrictPeerToPeer()
           
 void setAllowDuplicateDomains(boolean allowDuplicateDomains)
          Deprecated. 
 void setAsyncListenerExecutorFactoryClass(String asyncListenerExecutorFactoryClass)
          Deprecated. 
 void setAsyncListenerExecutorProperties(Properties asyncListenerExecutorProperties)
          Deprecated. 
 void setAsyncListenerExecutorProperties(String asyncListenerExecutorPropertiesString)
          Deprecated. 
 void setAsyncTransportExecutorFactoryClass(String asyncTransportExecutorFactoryClass)
          Deprecated. 
 void setAsyncTransportExecutorProperties(Properties asyncTransportExecutorProperties)
          Deprecated. 
 void setAsyncTransportExecutorProperties(String asyncSerializationExecutorPropertiesString)
          Deprecated. 
 void setCacheManagerName(String cacheManagerName)
          Deprecated. 
 void setClusterName(String clusterName)
          Deprecated. 
 void setDistributedSyncTimeout(long distributedSyncTimeout)
          Deprecated. 
 void setEvictionScheduledExecutorFactoryClass(String evictionScheduledExecutorFactoryClass)
          Deprecated. 
 void setEvictionScheduledExecutorProperties(Properties evictionScheduledExecutorProperties)
          Deprecated. 
 void setEvictionScheduledExecutorProperties(String evictionScheduledExecutorPropertiesString)
          Deprecated. 
 void setExposeGlobalJmxStatistics(boolean exposeGlobalJmxStatistics)
          Deprecated. 
 void setExternalizersType(GlobalConfiguration.ExternalizersType externalizersType)
           
 void setJmxDomain(String jmxObjectName)
          Deprecated. 
 void setMachineId(String machineId)
          Deprecated. 
 void setMarshallerClass(String marshallerClass)
          Deprecated. 
 void setMarshallVersion(short marshallVersion)
          Deprecated. 
 void setMarshallVersion(String marshallVersion)
          Deprecated. 
 void setMBeanServerLookup(MBeanServerLookup mBeanServerLookup)
          Deprecated. Use setMBeanServerLookupInstance(org.infinispan.jmx.MBeanServerLookup) instead.
 void setMBeanServerLookup(String mBeanServerLookupClass)
          Deprecated. 
 void setMBeanServerLookupInstance(MBeanServerLookup mBeanServerLookupInstance)
          Deprecated. 
 void setMBeanServerProperties(Properties properties)
          Deprecated. 
 void setRackId(String rackId)
          Deprecated. 
 void setReplicationQueueScheduledExecutorFactoryClass(String replicationQueueScheduledExecutorFactoryClass)
          Deprecated. 
 void setReplicationQueueScheduledExecutorProperties(Properties replicationQueueScheduledExecutorProperties)
          Deprecated. 
 void setReplicationQueueScheduledExecutorProperties(String replicationQueueScheduledExecutorPropertiesString)
          Deprecated. 
 void setShutdownHookBehavior(GlobalConfiguration.ShutdownHookBehavior shutdownHookBehavior)
          Behavior of the JVM shutdown hook registered by the cache.
 void setShutdownHookBehavior(String shutdownHookBehavior)
           
 void setSiteId(String siteId)
          Deprecated. 
 void setStrictPeerToPeer(boolean strictPeerToPeer)
          Deprecated. 
 void setTransportClass(String transportClass)
          Deprecated. 
 void setTransportNodeName(String nodeName)
          Deprecated. 
 void setTransportProperties(Properties transportProperties)
          Deprecated. 
 void setTransportProperties(String transportPropertiesString)
          Deprecated. 
 
Methods inherited from class org.infinispan.config.AbstractConfigurationBean
testImmutability, toTypedProperties, toTypedProperties, uc, willUnmarshall
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MARSHALL_VERSION

public static final short DEFAULT_MARSHALL_VERSION
Default replication version, from Version.getVersionShort().

Constructor Detail

GlobalConfiguration

public GlobalConfiguration()
Method Detail

configureAsyncListenerExecutor

public GlobalConfiguration.ExecutorFactoryConfig<ExecutorFactory> configureAsyncListenerExecutor()

configureAsyncTransportExecutor

public GlobalConfiguration.ExecutorFactoryConfig<ExecutorFactory> configureAsyncTransportExecutor()

configureEvictionScheduledExecutor

public GlobalConfiguration.ExecutorFactoryConfig<ScheduledExecutorFactory> configureEvictionScheduledExecutor()

configureReplicationQueueScheduledExecutor

public GlobalConfiguration.ExecutorFactoryConfig<ScheduledExecutorFactory> configureReplicationQueueScheduledExecutor()

configureGlobalJmxStatistics

public GlobalConfiguration.GlobalJmxStatisticsConfig configureGlobalJmxStatistics()

configureSerialization

public GlobalConfiguration.SerializationConfig configureSerialization()

configureTransport

public GlobalConfiguration.TransportConfig configureTransport()

isExposeGlobalJmxStatistics

public boolean isExposeGlobalJmxStatistics()

setExposeGlobalJmxStatistics

@Deprecated
public void setExposeGlobalJmxStatistics(boolean exposeGlobalJmxStatistics)
Deprecated. 

Toggle to enable/disable global statistics being exported via JMX

Parameters:
exposeGlobalJmxStatistics -

setJmxDomain

@Deprecated
public void setJmxDomain(String jmxObjectName)
Deprecated. 

If JMX statistics are enabled then all 'published' JMX objects will appear under this name. This is optional, if not specified an object name will be created for you by default.

Parameters:
jmxObjectName -

getJmxDomain

public String getJmxDomain()
See Also:
setJmxDomain(String)

getMBeanServerLookup

public String getMBeanServerLookup()

getMBeanServerProperties

public Properties getMBeanServerProperties()

setMBeanServerProperties

@Deprecated
public void setMBeanServerProperties(Properties properties)
Deprecated. 

Sets properties which are then passed to the MBean Server Lookup implementation specified.

Parameters:
properties - properties to pass to the MBean Server Lookup

setMBeanServerLookup

@Deprecated
public void setMBeanServerLookup(String mBeanServerLookupClass)
Deprecated. 

Fully qualified name of class that will attempt to locate a JMX MBean server to bind to

Parameters:
mBeanServerLookupClass - fully qualified class name of the MBean Server Lookup class implementation

setMBeanServerLookup

@Deprecated
public void setMBeanServerLookup(MBeanServerLookup mBeanServerLookup)
Deprecated. Use setMBeanServerLookupInstance(org.infinispan.jmx.MBeanServerLookup) instead.


setMBeanServerLookupInstance

@Deprecated
public void setMBeanServerLookupInstance(MBeanServerLookup mBeanServerLookupInstance)
Deprecated. 

Sets the instance of the MBeanServerLookup class to be used to bound JMX MBeans to.

Parameters:
mBeanServerLookupInstance - An instance of MBeanServerLookup

getMBeanServerLookupInstance

public MBeanServerLookup getMBeanServerLookupInstance()

isAllowDuplicateDomains

public boolean isAllowDuplicateDomains()

setAllowDuplicateDomains

@Deprecated
public void setAllowDuplicateDomains(boolean allowDuplicateDomains)
Deprecated. 

If true, multiple cache manager instances could be configured under the same configured JMX domain. Each cache manager will in practice use a different JMX domain that has been calculated based on the configured one by adding an incrementing index to it.

Parameters:
allowDuplicateDomains -

getCacheManagerName

public String getCacheManagerName()

setCacheManagerName

@Deprecated
public void setCacheManagerName(String cacheManagerName)
Deprecated. 

If JMX statistics are enabled, this property represents the name of this cache manager. It offers the possibility for clients to provide a user-defined name to the cache manager which later can be used to identify the cache manager within a JMX based management tool amongst other cache managers that might be running under the same JVM.

Parameters:
cacheManagerName -

isStrictPeerToPeer

public boolean isStrictPeerToPeer()

setStrictPeerToPeer

@Deprecated
public void setStrictPeerToPeer(boolean strictPeerToPeer)
Deprecated. 

If set to true, RPC operations will fail if the named cache does not exist on remote nodes with a NamedCacheNotFoundException. Otherwise, operations will succeed but it will be logged on the caller that the RPC did not succeed on certain nodes due to the named cache not being available.

Parameters:
strictPeerToPeer - flag controlling this behavior

hasTopologyInfo

public boolean hasTopologyInfo()

hasComponentStarted

protected boolean hasComponentStarted()
Description copied from class: AbstractConfigurationBean
Tests whether the component this configuration bean intents to configure has already started.

Specified by:
hasComponentStarted in class AbstractConfigurationBean
Returns:
true if the component has started; false otherwise.

getAsyncListenerExecutorFactoryClass

public String getAsyncListenerExecutorFactoryClass()

setAsyncListenerExecutorFactoryClass

@Deprecated
public void setAsyncListenerExecutorFactoryClass(String asyncListenerExecutorFactoryClass)
Deprecated. 


getAsyncTransportExecutorFactoryClass

public String getAsyncTransportExecutorFactoryClass()

setAsyncTransportExecutorFactoryClass

@Deprecated
public void setAsyncTransportExecutorFactoryClass(String asyncTransportExecutorFactoryClass)
Deprecated. 


getEvictionScheduledExecutorFactoryClass

public String getEvictionScheduledExecutorFactoryClass()

setEvictionScheduledExecutorFactoryClass

@Deprecated
public void setEvictionScheduledExecutorFactoryClass(String evictionScheduledExecutorFactoryClass)
Deprecated. 


getReplicationQueueScheduledExecutorFactoryClass

public String getReplicationQueueScheduledExecutorFactoryClass()

setReplicationQueueScheduledExecutorFactoryClass

@Deprecated
public void setReplicationQueueScheduledExecutorFactoryClass(String replicationQueueScheduledExecutorFactoryClass)
Deprecated. 


getMarshallerClass

public String getMarshallerClass()

setMarshallerClass

@Deprecated
public void setMarshallerClass(String marshallerClass)
Deprecated. 

Fully qualified name of the marshaller to use. It must implement org.infinispan.marshall.StreamingMarshaller

Parameters:
marshallerClass -

getTransportNodeName

public String getTransportNodeName()

setTransportNodeName

@Deprecated
public void setTransportNodeName(String nodeName)
Deprecated. 

Name of the current node. This is a friendly name to make logs, etc. make more sense. Defaults to a combination of host name and a random number (to differentiate multiple nodes on the same host)

Parameters:
nodeName -

getTransportClass

public String getTransportClass()

setTransportClass

@Deprecated
public void setTransportClass(String transportClass)
Deprecated. 

Fully qualified name of a class that represents a network transport. Must implement org.infinispan.remoting.transport.Transport

Parameters:
transportClass -

getTransportProperties

public Properties getTransportProperties()

setTransportProperties

@Deprecated
public void setTransportProperties(Properties transportProperties)
Deprecated. 


setTransportProperties

@Deprecated
public void setTransportProperties(String transportPropertiesString)
Deprecated. 


getClusterName

public String getClusterName()

setClusterName

@Deprecated
public void setClusterName(String clusterName)
Deprecated. 

Defines the name of the cluster. Nodes only connect to clusters sharing the same name.

Parameters:
clusterName -

setMachineId

@Deprecated
public void setMachineId(String machineId)
Deprecated. 

The id of the machine where this node runs. Used for server hinting .


getMachineId

public String getMachineId()
See Also:
setMachineId(String)

setRackId

@Deprecated
public void setRackId(String rackId)
Deprecated. 

The id of the rack where this node runs. Used for server hinting .


getRackId

public String getRackId()
See Also:
setRackId(String)

setSiteId

@Deprecated
public void setSiteId(String siteId)
Deprecated. 

The id of the site where this node runs. Used for server hinting .


getSiteId

public String getSiteId()
See Also:
setSiteId(String)

getShutdownHookBehavior

public GlobalConfiguration.ShutdownHookBehavior getShutdownHookBehavior()

setShutdownHookBehavior

public void setShutdownHookBehavior(GlobalConfiguration.ShutdownHookBehavior shutdownHookBehavior)
Behavior of the JVM shutdown hook registered by the cache. The options available are: DEFAULT - A shutdown hook is registered even if no MBean server (apart from the JDK default) is detected. REGISTER - Forces the cache to register a shutdown hook even if an MBean server is detected. DONT_REGISTER - Forces the cache NOT to register a shutdown hook, even if no MBean server is detected.

Parameters:
shutdownHookBehavior -

setShutdownHookBehavior

public void setShutdownHookBehavior(String shutdownHookBehavior)

getAsyncListenerExecutorProperties

public Properties getAsyncListenerExecutorProperties()

setAsyncListenerExecutorProperties

@Deprecated
public void setAsyncListenerExecutorProperties(Properties asyncListenerExecutorProperties)
Deprecated. 


setAsyncListenerExecutorProperties

@Deprecated
public void setAsyncListenerExecutorProperties(String asyncListenerExecutorPropertiesString)
Deprecated. 


getAsyncTransportExecutorProperties

public Properties getAsyncTransportExecutorProperties()

setAsyncTransportExecutorProperties

@Deprecated
public void setAsyncTransportExecutorProperties(Properties asyncTransportExecutorProperties)
Deprecated. 


setAsyncTransportExecutorProperties

@Deprecated
public void setAsyncTransportExecutorProperties(String asyncSerializationExecutorPropertiesString)
Deprecated. 


getEvictionScheduledExecutorProperties

public Properties getEvictionScheduledExecutorProperties()

setEvictionScheduledExecutorProperties

@Deprecated
public void setEvictionScheduledExecutorProperties(Properties evictionScheduledExecutorProperties)
Deprecated. 


setEvictionScheduledExecutorProperties

@Deprecated
public void setEvictionScheduledExecutorProperties(String evictionScheduledExecutorPropertiesString)
Deprecated. 


getReplicationQueueScheduledExecutorProperties

public Properties getReplicationQueueScheduledExecutorProperties()

setReplicationQueueScheduledExecutorProperties

@Deprecated
public void setReplicationQueueScheduledExecutorProperties(Properties replicationQueueScheduledExecutorProperties)
Deprecated. 


setReplicationQueueScheduledExecutorProperties

@Deprecated
public void setReplicationQueueScheduledExecutorProperties(String replicationQueueScheduledExecutorPropertiesString)
Deprecated. 


getMarshallVersion

public short getMarshallVersion()

getMarshallVersionString

public String getMarshallVersionString()

setMarshallVersion

@Deprecated
public void setMarshallVersion(short marshallVersion)
Deprecated. 

Largest allowable version to use when marshalling internal state. Set this to the lowest version cache instance in your cluster to ensure compatibility of communications. However, setting this too low will mean you lose out on the benefit of improvements in newer versions of the marshaller.

Parameters:
marshallVersion -

setMarshallVersion

@Deprecated
public void setMarshallVersion(String marshallVersion)
Deprecated. 

Largest allowable version to use when marshalling internal state. Set this to the lowest version cache instance in your cluster to ensure compatibility of communications. However, setting this too low will mean you lose out on the benefit of improvements in newer versions of the marshaller.

Parameters:
marshallVersion -

addExternalizer

public void addExternalizer(Externalizer... externalizers)
Helper method that allows for quick registration of Externalizer implementations.

Parameters:
externalizers -

addExternalizer

public void addExternalizer(int id,
                            Externalizer externalizer)
Helper method that allows for quick registration of an Externalizer implementation alongside its corresponding identifier. Remember that the identifier needs to a be positive number, including 0, and cannot clash with other identifiers in the system.

Parameters:
id -
externalizer -

setExternalizersType

public void setExternalizersType(GlobalConfiguration.ExternalizersType externalizersType)

getExternalizersType

public GlobalConfiguration.ExternalizersType getExternalizersType()

getDistributedSyncTimeout

public long getDistributedSyncTimeout()

setDistributedSyncTimeout

@Deprecated
public void setDistributedSyncTimeout(long distributedSyncTimeout)
Deprecated. 


accept

public void accept(ConfigurationBeanVisitor v)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

clone

public GlobalConfiguration clone()
Specified by:
clone in interface CloneableConfigurationComponent
Overrides:
clone in class AbstractConfigurationBean

getClusteredDefault

public static GlobalConfiguration getClusteredDefault()
Helper method that gets you a default constructed GlobalConfiguration, preconfigured to use the default clustering stack.

Returns:
a new global configuration

getNonClusteredDefault

public static GlobalConfiguration getNonClusteredDefault()
Helper method that gets you a default constructed GlobalConfiguration, preconfigured for use in LOCAL mode

Returns:
a new global configuration


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