org.infinispan.configuration.global
Class TransportConfigurationBuilder

java.lang.Object
  extended by org.infinispan.configuration.global.TransportConfigurationBuilder
All Implemented Interfaces:
GlobalConfigurationChildBuilder

public class TransportConfigurationBuilder
extends Object

Configures the transport used for network communications across the cluster.


Field Summary
static Class<? extends Transport> DEFAULT_TRANSPORT
           
 
Method Summary
 TransportConfigurationBuilder addProperty(String key, String value)
           
 ExecutorFactoryConfigurationBuilder asyncListenerExecutor()
           
 ExecutorFactoryConfigurationBuilder asyncTransportExecutor()
           
 GlobalConfiguration build()
           
 TransportConfigurationBuilder clearProperties()
          Clears the transport properties
 TransportConfigurationBuilder clusterName(String clusterName)
          Defines the name of the cluster.
 TransportConfigurationBuilder defaultTransport()
           
 TransportConfigurationBuilder distributedSyncTimeout(long distributedSyncTimeout)
          Timeout for coordinating cluster formation when nodes join or leave the cluster.
 boolean equals(Object o)
           
 ScheduledExecutorFactoryConfigurationBuilder evictionScheduledExecutor()
           
protected  GlobalConfigurationBuilder getGlobalConfig()
           
 Transport getTransport()
           
 GlobalJmxStatisticsConfigurationBuilder globalJmxStatistics()
           
 int hashCode()
           
 TransportConfigurationBuilder machineId(String machineId)
          The id of the machine where this node runs.
 TransportConfigurationBuilder nodeName(String nodeName)
          Name of the current node.
 TransportConfigurationBuilder rackId(String rackId)
          The id of the rack where this node runs.
 TransportConfigurationBuilder removeProperty(String key)
           
 ScheduledExecutorFactoryConfigurationBuilder replicationQueueScheduledExecutor()
           
 SerializationConfigurationBuilder serialization()
           
 ShutdownConfigurationBuilder shutdown()
           
 TransportConfigurationBuilder siteId(String siteId)
          The id of the site where this node runs.
 TransportConfigurationBuilder strictPeerToPeer(Boolean strictPeerToPeer)
          If set to true, RPC operations will fail if the named cache does not exist on remote nodes with a NamedCacheNotFoundException.
 String toString()
           
 TransportConfigurationBuilder transport()
           
 TransportConfigurationBuilder transport(Transport transport)
          Class that represents a network transport.
 TransportConfigurationBuilder withProperties(Properties properties)
          Sets transport properties
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_TRANSPORT

public static final Class<? extends Transport> DEFAULT_TRANSPORT
Method Detail

clusterName

public TransportConfigurationBuilder clusterName(String clusterName)
Defines the name of the cluster. Nodes only connect to clusters sharing the same name.

Parameters:
clusterName -

machineId

public TransportConfigurationBuilder machineId(String machineId)
The id of the machine where this node runs. Used for server hinting .


rackId

public TransportConfigurationBuilder rackId(String rackId)
The id of the rack where this node runs. Used for server hinting .


siteId

public TransportConfigurationBuilder siteId(String siteId)
The id of the site where this node runs. Used for server hinting .


distributedSyncTimeout

public TransportConfigurationBuilder distributedSyncTimeout(long distributedSyncTimeout)
Timeout for coordinating cluster formation when nodes join or leave the cluster.

Parameters:
distributedSyncTimeout -
Returns:

transport

public TransportConfigurationBuilder transport(Transport transport)
Class that represents a network transport. Must implement org.infinispan.remoting.transport.Transport NOTE: Currently Infinispan will not use the object instance, but instead instantiate a new instance of the class. Therefore, do not expect any state to survive, and provide a no-args constructor to any instance. This will be resolved in Infinispan 5.2.0

Parameters:
transport - transport instance

nodeName

public TransportConfigurationBuilder nodeName(String nodeName)
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 -

withProperties

public TransportConfigurationBuilder withProperties(Properties properties)
Sets transport properties

Parameters:
properties -
Returns:
this TransportConfig

clearProperties

public TransportConfigurationBuilder clearProperties()
Clears the transport properties

Returns:
this TransportConfig

addProperty

public TransportConfigurationBuilder addProperty(String key,
                                                 String value)

removeProperty

public TransportConfigurationBuilder removeProperty(String key)

strictPeerToPeer

public TransportConfigurationBuilder strictPeerToPeer(Boolean strictPeerToPeer)
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

defaultTransport

public TransportConfigurationBuilder defaultTransport()

getTransport

public Transport getTransport()

toString

public String toString()
Overrides:
toString in class Object

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getGlobalConfig

protected GlobalConfigurationBuilder getGlobalConfig()

transport

public TransportConfigurationBuilder transport()
Specified by:
transport in interface GlobalConfigurationChildBuilder

globalJmxStatistics

public GlobalJmxStatisticsConfigurationBuilder globalJmxStatistics()
Specified by:
globalJmxStatistics in interface GlobalConfigurationChildBuilder

serialization

public SerializationConfigurationBuilder serialization()
Specified by:
serialization in interface GlobalConfigurationChildBuilder

asyncListenerExecutor

public ExecutorFactoryConfigurationBuilder asyncListenerExecutor()
Specified by:
asyncListenerExecutor in interface GlobalConfigurationChildBuilder

asyncTransportExecutor

public ExecutorFactoryConfigurationBuilder asyncTransportExecutor()
Specified by:
asyncTransportExecutor in interface GlobalConfigurationChildBuilder

evictionScheduledExecutor

public ScheduledExecutorFactoryConfigurationBuilder evictionScheduledExecutor()
Specified by:
evictionScheduledExecutor in interface GlobalConfigurationChildBuilder

replicationQueueScheduledExecutor

public ScheduledExecutorFactoryConfigurationBuilder replicationQueueScheduledExecutor()
Specified by:
replicationQueueScheduledExecutor in interface GlobalConfigurationChildBuilder

shutdown

public ShutdownConfigurationBuilder shutdown()
Specified by:
shutdown in interface GlobalConfigurationChildBuilder

build

public GlobalConfiguration build()
Specified by:
build in interface GlobalConfigurationChildBuilder

-->

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