Class TransportConfigurationBuilder
java.lang.Object
org.infinispan.configuration.global.TransportConfigurationBuilder
- All Implemented Interfaces:
Builder<TransportConfiguration>
,GlobalConfigurationChildBuilder
public class TransportConfigurationBuilder
extends Object
implements Builder<TransportConfiguration>
Configures the transport used for network communications across the cluster.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddProperty
(String key, Object value) Configuration for the asynchronous operations thread poolConfiguration for the blocking thread poolbuild()
Builds aGlobalConfiguration
object using the settings applied to this builderClears the transport propertiesclusterName
(String clusterName) Defines the name of the cluster.create()
Create the configuration beandefaultCacheName
(String defaultCacheName) Sets the name of the cache that acts as the default cache and is returned byEmbeddedCacheManager.getCache()
.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 unitsConfiguration for the expiration thread poolprotected GlobalConfigurationBuilder
getProperty
(String key) Global state configurationinitialClusterSize
(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()
jmx()
Global JMX configuration.Configuration for the listener thread poolThe id of the machine where this node runs.metrics()
Global metrics configuration.modules()
Global modules configurationName of the current node.Configuration for the non blocking thread poolConfiguration for the persistence thread poolThe 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, Combine combine) Reads the configuration from an already created configuration bean into this builder.removeProperty
(String key) security()
Security-related configurationGlobal serialization (i.e.shutdown()
Shutdown configurationsite()
Cross-site replication configurationThe id of the site where this node runs.toString()
tracing()
Global tracing configuration.Transport-related (i.e.Class that represents a network transport.transportExecutor
(String threadPoolName) Deprecated, for removal: This API element is subject to removal in a future version.void
validate()
Validate the data in this builder before building the configuration beanwithProperties
(Properties properties) Sets transport properties
-
Field Details
-
DEFAULT_TRANSPORT
- See Also:
-
-
Method Details
-
attributes
- Specified by:
attributes
in interfaceBuilder<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
-
transportThreadPool
-
remoteCommandThreadPool
-
validate
public void validate()Description copied from interface:Builder
Validate the data in this builder before building the configuration bean- Specified by:
validate
in interfaceBuilder<TransportConfiguration>
-
jgroups
-
create
Description copied from interface:Builder
Create the configuration bean- Specified by:
create
in interfaceBuilder<TransportConfiguration>
- Returns:
-
defaultTransport
-
transportExecutor
@Deprecated(forRemoval=true, since="11.0") public TransportConfigurationBuilder transportExecutor(String threadPoolName) Deprecated, for removal: This API element is subject to removal in a future version. -
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
Description copied from interface:Builder
Reads the configuration from an already created configuration bean into this builder. Returns an appropriate builder to allow fluent configuration- Specified by:
read
in interfaceBuilder<TransportConfiguration>
- Parameters:
template
- the configuration from which to "clone" this config if needed.combine
- the way attributes and children of this instance and the template should be combined.
-
getTransport
-
toString
-
getGlobalConfig
-
transport
Description copied from interface:GlobalConfigurationChildBuilder
Transport-related (i.e. clustering) configuration- Specified by:
transport
in interfaceGlobalConfigurationChildBuilder
-
metrics
Description copied from interface:GlobalConfigurationChildBuilder
Global metrics configuration.- Specified by:
metrics
in interfaceGlobalConfigurationChildBuilder
-
tracing
Description copied from interface:GlobalConfigurationChildBuilder
Global tracing configuration.- Specified by:
tracing
in interfaceGlobalConfigurationChildBuilder
-
jmx
Description copied from interface:GlobalConfigurationChildBuilder
Global JMX configuration.- Specified by:
jmx
in interfaceGlobalConfigurationChildBuilder
-
globalState
Description copied from interface:GlobalConfigurationChildBuilder
Global state configuration- Specified by:
globalState
in interfaceGlobalConfigurationChildBuilder
-
serialization
Description copied from interface:GlobalConfigurationChildBuilder
Global serialization (i.e. marshalling) configuration- Specified by:
serialization
in interfaceGlobalConfigurationChildBuilder
-
listenerThreadPool
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the listener thread pool- Specified by:
listenerThreadPool
in interfaceGlobalConfigurationChildBuilder
-
asyncThreadPool
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the asynchronous operations thread pool- Specified by:
asyncThreadPool
in interfaceGlobalConfigurationChildBuilder
-
expirationThreadPool
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the expiration thread pool- Specified by:
expirationThreadPool
in interfaceGlobalConfigurationChildBuilder
-
persistenceThreadPool
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the persistence thread pool- Specified by:
persistenceThreadPool
in interfaceGlobalConfigurationChildBuilder
-
blockingThreadPool
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the blocking thread pool- Specified by:
blockingThreadPool
in interfaceGlobalConfigurationChildBuilder
-
nonBlockingThreadPool
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the non blocking thread pool- Specified by:
nonBlockingThreadPool
in interfaceGlobalConfigurationChildBuilder
-
security
Description copied from interface:GlobalConfigurationChildBuilder
Security-related configuration- Specified by:
security
in interfaceGlobalConfigurationChildBuilder
-
shutdown
Description copied from interface:GlobalConfigurationChildBuilder
Shutdown configuration- Specified by:
shutdown
in interfaceGlobalConfigurationChildBuilder
-
site
Description copied from interface:GlobalConfigurationChildBuilder
Cross-site replication configuration- Specified by:
site
in interfaceGlobalConfigurationChildBuilder
-
modules
Description copied from interface:GlobalConfigurationChildBuilder
Global modules configuration- Specified by:
modules
in interfaceGlobalConfigurationChildBuilder
-
defaultCacheName
Description copied from interface:GlobalConfigurationChildBuilder
Sets the name of the cache that acts as the default cache and is returned byEmbeddedCacheManager.getCache()
. Not- Specified by:
defaultCacheName
in interfaceGlobalConfigurationChildBuilder
-
build
Description copied from interface:GlobalConfigurationChildBuilder
Builds aGlobalConfiguration
object using the settings applied to this builder- Specified by:
build
in interfaceGlobalConfigurationChildBuilder
-