Class TransportConfigurationBuilder
java.lang.Object
org.infinispan.configuration.global.AbstractGlobalConfigurationBuilder
org.infinispan.configuration.global.TransportConfigurationBuilder
- All Implemented Interfaces:
org.infinispan.commons.configuration.Builder<TransportConfiguration>, GlobalConfigurationChildBuilder
public class TransportConfigurationBuilder
extends AbstractGlobalConfigurationBuilder
implements org.infinispan.commons.configuration.Builder<TransportConfiguration>
Configures the transport used for network communications across the cluster.
-
Method Summary
Modifier and TypeMethodDescriptionaddProperty(String key, Object value) org.infinispan.commons.configuration.attributes.AttributeSetClears the transport propertiesclusterName(String clusterName) Defines the name of the cluster.create()distributedSyncTimeout(long distributedSyncTimeout) Timeout for coordinating cluster formation when nodes join or leave the cluster.distributedSyncTimeout(long distributedSyncTimeout, TimeUnit unit) Timeout for coordinating cluster formation when nodes join or leave the cluster.distributedSyncTimeout(String distributedSyncTimeout) Same asdistributedSyncTimeout(long)but supporting time unitsgetProperty(String key) initialClusterSize(int clusterSize) Sets the number of nodes that need to join before the cache container can start.initialClusterTimeout(long initialClusterTimeout, TimeUnit unit) Sets the timeout for the initial cluster to form.initialClusterTimeout(String initialClusterTimeout) Same asinitialClusterTimeout(long, TimeUnit)but supporting time units.jgroups()The id of the machine where this node runs.Name of the current node.The id of the rack where this node runs.raftMember(String member) Adds a single member to theraft-members.raftMembers(String... members) Adds multiple members to theraft-members.raftMembers(Collection<String> members) Adds multiple members to theraft-members.read(TransportConfiguration template, org.infinispan.commons.configuration.Combine combine) removeProperty(String key) The id of the site where this node runs.toString()transport(JGroupsTransport transport) Class that represents a network transport.voidvalidate()withProperties(Properties properties) Sets transport propertiesMethods inherited from class AbstractGlobalConfigurationBuilder
addModule, asyncThreadPool, blockingThreadPool, build, clearModules, defaultCacheName, expirationThreadPool, getGlobalConfig, globalState, jmx, listenerThreadPool, metrics, module, modules, nonBlockingThreadPool, persistenceThreadPool, security, serialization, shutdown, tracing, transportMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.commons.configuration.Builder
read, reset
-
Method Details
-
attributes
public org.infinispan.commons.configuration.attributes.AttributeSet attributes()- Specified by:
attributesin interfaceorg.infinispan.commons.configuration.Builder<TransportConfiguration>
-
clusterName
Defines the name of the cluster. Nodes only connect to clusters sharing the same name.- Parameters:
clusterName-
-
machineId
The id of the machine where this node runs. Used for server hinting . -
rackId
The id of the rack where this node runs. Used for server hinting . -
siteId
The id of the site where this node runs. Used for server hinting . -
stack
-
distributedSyncTimeout
Timeout for coordinating cluster formation when nodes join or leave the cluster.- Parameters:
distributedSyncTimeout-- Returns:
-
distributedSyncTimeout
Same asdistributedSyncTimeout(long)but supporting time units -
distributedSyncTimeout
public TransportConfigurationBuilder distributedSyncTimeout(long distributedSyncTimeout, TimeUnit unit) Timeout for coordinating cluster formation when nodes join or leave the cluster.- Parameters:
distributedSyncTimeout-- Returns:
-
initialClusterSize
Sets the number of nodes that need to join before the cache container can start. The default is to start immediately without waiting. -
initialClusterTimeout
public TransportConfigurationBuilder initialClusterTimeout(long initialClusterTimeout, TimeUnit unit) Sets the timeout for the initial cluster to form. Defaults to 1 minute -
initialClusterTimeout
Same asinitialClusterTimeout(long, TimeUnit)but supporting time units. -
transport
Class that represents a network transport. Must implement org.infinispan.remoting.transport.Transport- Parameters:
transport- transport instance
-
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
Sets transport properties- Parameters:
properties-- Returns:
- this TransportConfig
-
clearProperties
Clears the transport properties- Returns:
- this TransportConfig
-
addProperty
-
removeProperty
-
getProperty
-
validate
public void validate()- Specified by:
validatein interfaceorg.infinispan.commons.configuration.Builder<TransportConfiguration>
-
jgroups
-
create
- Specified by:
createin interfaceorg.infinispan.commons.configuration.Builder<TransportConfiguration>
-
defaultTransport
-
raftMember
Adds a single member to theraft-members.- Parameters:
member- The member to add
-
raftMembers
Adds multiple members to theraft-members.- Parameters:
members- The members to add
-
raftMembers
Adds multiple members to theraft-members.- Parameters:
members- The members to add
-
read
public TransportConfigurationBuilder read(TransportConfiguration template, org.infinispan.commons.configuration.Combine combine) - Specified by:
readin interfaceorg.infinispan.commons.configuration.Builder<TransportConfiguration>
-
getTransport
-
toString
-