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
Fields Modifier and Type Field Description static StringDEFAULT_TRANSPORT
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TransportConfigurationBuilderaddProperty(String key, String value)ThreadPoolConfigurationBuilderasyncThreadPool()Configuration for the asynchronous operations thread poolGlobalConfigurationbuild()Builds aGlobalConfigurationobject using the settings applied to this builderTransportConfigurationBuilderclearProperties()Clears the transport propertiesTransportConfigurationBuilderclusterName(String clusterName)Defines the name of the cluster.TransportConfigurationcreate()Create the configuration beanGlobalConfigurationBuilderdefaultCacheName(String defaultCacheName)Sets the name of the cache that acts as the default cache and is returned byEmbeddedCacheManager.getCache().TransportConfigurationBuilderdefaultTransport()TransportConfigurationBuilderdistributedSyncTimeout(long distributedSyncTimeout)Timeout for coordinating cluster formation when nodes join or leave the cluster.TransportConfigurationBuilderdistributedSyncTimeout(long distributedSyncTimeout, TimeUnit unit)Timeout for coordinating cluster formation when nodes join or leave the cluster.ThreadPoolConfigurationBuilderexpirationThreadPool()Configuration for the expiration thread poolprotected GlobalConfigurationBuildergetGlobalConfig()StringgetProperty(String key)org.infinispan.remoting.transport.TransportgetTransport()GlobalStateConfigurationBuilderglobalState()Global state configurationTransportConfigurationBuilderinitialClusterSize(int clusterSize)Sets the number of nodes that need to join before the cache container can start.TransportConfigurationBuilderinitialClusterTimeout(long initialClusterTimeout, TimeUnit unit)Sets the timeout for the initial cluster to form.JGroupsConfigurationBuilderjgroups()GlobalJmxConfigurationBuilderjmx()Global JMX configuration.ThreadPoolConfigurationBuilderlistenerThreadPool()Configuration for the listener thread poolTransportConfigurationBuildermachineId(String machineId)The id of the machine where this node runs.GlobalMetricsConfigurationBuildermetrics()Global microprofile metrics configuration.List<Builder<?>>modules()Global modules configurationTransportConfigurationBuildernodeName(String nodeName)Name of the current node.ThreadPoolConfigurationBuilderpersistenceThreadPool()Configuration for the persistence thread poolTransportConfigurationBuilderrackId(String rackId)The id of the rack where this node runs.TransportConfigurationBuilderread(TransportConfiguration template)Reads the configuration from an already created configuration bean into this builder.ThreadPoolConfigurationBuilderremoteCommandThreadPool()TransportConfigurationBuilderremoteExecutor(String threadPoolName)TransportConfigurationBuilderremoveProperty(String key)GlobalSecurityConfigurationBuildersecurity()Security-related configurationSerializationConfigurationBuilderserialization()Global serialization (i.e.ShutdownConfigurationBuildershutdown()Shutdown configurationSiteConfigurationBuildersite()Cross-site replication configurationTransportConfigurationBuildersiteId(String siteId)The id of the site where this node runs.ThreadPoolConfigurationBuilderstateTransferThreadPool()Configuration for the state-transfer thread poolStringtoString()TransportConfigurationBuildertransport()Transport-related (i.e.TransportConfigurationBuildertransport(org.infinispan.remoting.transport.Transport transport)Class that represents a network transport.TransportConfigurationBuildertransportExecutor(String threadPoolName)ThreadPoolConfigurationBuildertransportThreadPool()voidvalidate()Validate the data in this builder before building the configuration beanTransportConfigurationBuilderwithProperties(Properties properties)Sets transport properties-
Methods inherited from interface org.infinispan.configuration.global.GlobalConfigurationChildBuilder
globalJmxStatistics
-
-
-
-
Field Detail
-
DEFAULT_TRANSPORT
public static final String DEFAULT_TRANSPORT
- See Also:
- Constant Field Values
-
-
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:
-
distributedSyncTimeout
public TransportConfigurationBuilder distributedSyncTimeout(long distributedSyncTimeout, TimeUnit unit)
Timeout for coordinating cluster formation when nodes join or leave the cluster.- Parameters:
distributedSyncTimeout-- Returns:
-
initialClusterSize
public TransportConfigurationBuilder initialClusterSize(int clusterSize)
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
-
transport
public TransportConfigurationBuilder transport(org.infinispan.remoting.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.- 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)
-
transportThreadPool
public ThreadPoolConfigurationBuilder transportThreadPool()
-
remoteCommandThreadPool
public ThreadPoolConfigurationBuilder remoteCommandThreadPool()
-
validate
public void validate()
Description copied from interface:BuilderValidate the data in this builder before building the configuration bean- Specified by:
validatein interfaceBuilder<TransportConfiguration>
-
jgroups
public JGroupsConfigurationBuilder jgroups()
-
create
public TransportConfiguration create()
Description copied from interface:BuilderCreate the configuration bean- Specified by:
createin interfaceBuilder<TransportConfiguration>- Returns:
-
defaultTransport
public TransportConfigurationBuilder defaultTransport()
-
transportExecutor
public TransportConfigurationBuilder transportExecutor(String threadPoolName)
-
remoteExecutor
public TransportConfigurationBuilder remoteExecutor(String threadPoolName)
-
read
public TransportConfigurationBuilder read(TransportConfiguration template)
Description copied from interface:BuilderReads the configuration from an already created configuration bean into this builder. Returns an appropriate builder to allow fluent configuration- Specified by:
readin interfaceBuilder<TransportConfiguration>- Parameters:
template- the configuration from which to "clone" this config if needed.
-
getTransport
public org.infinispan.remoting.transport.Transport getTransport()
-
toString
public String toString()
-
getGlobalConfig
protected GlobalConfigurationBuilder getGlobalConfig()
-
transport
public TransportConfigurationBuilder transport()
Description copied from interface:GlobalConfigurationChildBuilderTransport-related (i.e. clustering) configuration- Specified by:
transportin interfaceGlobalConfigurationChildBuilder
-
metrics
public GlobalMetricsConfigurationBuilder metrics()
Description copied from interface:GlobalConfigurationChildBuilderGlobal microprofile metrics configuration.- Specified by:
metricsin interfaceGlobalConfigurationChildBuilder
-
jmx
public GlobalJmxConfigurationBuilder jmx()
Description copied from interface:GlobalConfigurationChildBuilderGlobal JMX configuration.- Specified by:
jmxin interfaceGlobalConfigurationChildBuilder
-
globalState
public GlobalStateConfigurationBuilder globalState()
Description copied from interface:GlobalConfigurationChildBuilderGlobal state configuration- Specified by:
globalStatein interfaceGlobalConfigurationChildBuilder
-
serialization
public SerializationConfigurationBuilder serialization()
Description copied from interface:GlobalConfigurationChildBuilderGlobal serialization (i.e. marshalling) configuration- Specified by:
serializationin interfaceGlobalConfigurationChildBuilder
-
listenerThreadPool
public ThreadPoolConfigurationBuilder listenerThreadPool()
Description copied from interface:GlobalConfigurationChildBuilderConfiguration for the listener thread pool- Specified by:
listenerThreadPoolin interfaceGlobalConfigurationChildBuilder
-
asyncThreadPool
public ThreadPoolConfigurationBuilder asyncThreadPool()
Description copied from interface:GlobalConfigurationChildBuilderConfiguration for the asynchronous operations thread pool- Specified by:
asyncThreadPoolin interfaceGlobalConfigurationChildBuilder
-
expirationThreadPool
public ThreadPoolConfigurationBuilder expirationThreadPool()
Description copied from interface:GlobalConfigurationChildBuilderConfiguration for the expiration thread pool- Specified by:
expirationThreadPoolin interfaceGlobalConfigurationChildBuilder
-
persistenceThreadPool
public ThreadPoolConfigurationBuilder persistenceThreadPool()
Description copied from interface:GlobalConfigurationChildBuilderConfiguration for the persistence thread pool- Specified by:
persistenceThreadPoolin interfaceGlobalConfigurationChildBuilder
-
stateTransferThreadPool
public ThreadPoolConfigurationBuilder stateTransferThreadPool()
Description copied from interface:GlobalConfigurationChildBuilderConfiguration for the state-transfer thread pool- Specified by:
stateTransferThreadPoolin interfaceGlobalConfigurationChildBuilder
-
security
public GlobalSecurityConfigurationBuilder security()
Description copied from interface:GlobalConfigurationChildBuilderSecurity-related configuration- Specified by:
securityin interfaceGlobalConfigurationChildBuilder
-
shutdown
public ShutdownConfigurationBuilder shutdown()
Description copied from interface:GlobalConfigurationChildBuilderShutdown configuration- Specified by:
shutdownin interfaceGlobalConfigurationChildBuilder
-
site
public SiteConfigurationBuilder site()
Description copied from interface:GlobalConfigurationChildBuilderCross-site replication configuration- Specified by:
sitein interfaceGlobalConfigurationChildBuilder
-
modules
public List<Builder<?>> modules()
Description copied from interface:GlobalConfigurationChildBuilderGlobal modules configuration- Specified by:
modulesin interfaceGlobalConfigurationChildBuilder
-
defaultCacheName
public GlobalConfigurationBuilder defaultCacheName(String defaultCacheName)
Description copied from interface:GlobalConfigurationChildBuilderSets the name of the cache that acts as the default cache and is returned byEmbeddedCacheManager.getCache(). Not- Specified by:
defaultCacheNamein interfaceGlobalConfigurationChildBuilder
-
build
public GlobalConfiguration build()
Description copied from interface:GlobalConfigurationChildBuilderBuilds aGlobalConfigurationobject using the settings applied to this builder- Specified by:
buildin interfaceGlobalConfigurationChildBuilder
-
-