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 String
DEFAULT_TRANSPORT
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TransportConfigurationBuilder
addProperty(String key, String value)
ThreadPoolConfigurationBuilder
asyncThreadPool()
Configuration for the asynchronous operations thread poolThreadPoolConfigurationBuilder
blockingThreadPool()
Configuration for the blocking thread poolGlobalConfiguration
build()
Builds aGlobalConfiguration
object using the settings applied to this builderTransportConfigurationBuilder
clearProperties()
Clears the transport propertiesTransportConfigurationBuilder
clusterName(String clusterName)
Defines the name of the cluster.TransportConfiguration
create()
Create the configuration beanGlobalConfigurationBuilder
defaultCacheName(String defaultCacheName)
Sets the name of the cache that acts as the default cache and is returned byEmbeddedCacheManager.getCache()
.TransportConfigurationBuilder
defaultTransport()
TransportConfigurationBuilder
distributedSyncTimeout(long distributedSyncTimeout)
Timeout for coordinating cluster formation when nodes join or leave the cluster.TransportConfigurationBuilder
distributedSyncTimeout(long distributedSyncTimeout, TimeUnit unit)
Timeout for coordinating cluster formation when nodes join or leave the cluster.ThreadPoolConfigurationBuilder
expirationThreadPool()
Configuration for the expiration thread poolprotected GlobalConfigurationBuilder
getGlobalConfig()
String
getProperty(String key)
org.infinispan.remoting.transport.Transport
getTransport()
GlobalStateConfigurationBuilder
globalState()
Global state configurationTransportConfigurationBuilder
initialClusterSize(int clusterSize)
Sets the number of nodes that need to join before the cache container can start.TransportConfigurationBuilder
initialClusterTimeout(long initialClusterTimeout, TimeUnit unit)
Sets the timeout for the initial cluster to form.JGroupsConfigurationBuilder
jgroups()
GlobalJmxConfigurationBuilder
jmx()
Global JMX configuration.ThreadPoolConfigurationBuilder
listenerThreadPool()
Configuration for the listener thread poolTransportConfigurationBuilder
machineId(String machineId)
The id of the machine where this node runs.GlobalMetricsConfigurationBuilder
metrics()
Global microprofile metrics configuration.List<Builder<?>>
modules()
Global modules configurationTransportConfigurationBuilder
nodeName(String nodeName)
Name of the current node.ThreadPoolConfigurationBuilder
nonBlockingThreadPool()
Configuration for the non blocking thread poolThreadPoolConfigurationBuilder
persistenceThreadPool()
Configuration for the persistence thread poolTransportConfigurationBuilder
rackId(String rackId)
The id of the rack where this node runs.TransportConfigurationBuilder
read(TransportConfiguration template)
Reads the configuration from an already created configuration bean into this builder.ThreadPoolConfigurationBuilder
remoteCommandThreadPool()
TransportConfigurationBuilder
remoteExecutor(String threadPoolName)
TransportConfigurationBuilder
removeProperty(String key)
GlobalSecurityConfigurationBuilder
security()
Security-related configurationSerializationConfigurationBuilder
serialization()
Global serialization (i.e.ShutdownConfigurationBuilder
shutdown()
Shutdown configurationSiteConfigurationBuilder
site()
Cross-site replication configurationTransportConfigurationBuilder
siteId(String siteId)
The id of the site where this node runs.ThreadPoolConfigurationBuilder
stateTransferThreadPool()
Configuration for the state-transfer thread poolString
toString()
TransportConfigurationBuilder
transport()
Transport-related (i.e.TransportConfigurationBuilder
transport(org.infinispan.remoting.transport.Transport transport)
Class that represents a network transport.TransportConfigurationBuilder
transportExecutor(String threadPoolName)
Deprecated.ThreadPoolConfigurationBuilder
transportThreadPool()
void
validate()
Validate the data in this builder before building the configuration beanTransportConfigurationBuilder
withProperties(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:Builder
Validate the data in this builder before building the configuration bean- Specified by:
validate
in interfaceBuilder<TransportConfiguration>
-
jgroups
public JGroupsConfigurationBuilder jgroups()
-
create
public TransportConfiguration create()
Description copied from interface:Builder
Create the configuration bean- Specified by:
create
in interfaceBuilder<TransportConfiguration>
- Returns:
-
defaultTransport
public TransportConfigurationBuilder defaultTransport()
-
transportExecutor
@Deprecated public TransportConfigurationBuilder transportExecutor(String threadPoolName)
Deprecated.
-
remoteExecutor
public TransportConfigurationBuilder remoteExecutor(String threadPoolName)
-
read
public TransportConfigurationBuilder read(TransportConfiguration template)
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.
-
getTransport
public org.infinispan.remoting.transport.Transport getTransport()
-
toString
public String toString()
-
getGlobalConfig
protected GlobalConfigurationBuilder getGlobalConfig()
-
transport
public TransportConfigurationBuilder transport()
Description copied from interface:GlobalConfigurationChildBuilder
Transport-related (i.e. clustering) configuration- Specified by:
transport
in interfaceGlobalConfigurationChildBuilder
-
metrics
public GlobalMetricsConfigurationBuilder metrics()
Description copied from interface:GlobalConfigurationChildBuilder
Global microprofile metrics configuration.- Specified by:
metrics
in interfaceGlobalConfigurationChildBuilder
-
jmx
public GlobalJmxConfigurationBuilder jmx()
Description copied from interface:GlobalConfigurationChildBuilder
Global JMX configuration.- Specified by:
jmx
in interfaceGlobalConfigurationChildBuilder
-
globalState
public GlobalStateConfigurationBuilder globalState()
Description copied from interface:GlobalConfigurationChildBuilder
Global state configuration- Specified by:
globalState
in interfaceGlobalConfigurationChildBuilder
-
serialization
public SerializationConfigurationBuilder serialization()
Description copied from interface:GlobalConfigurationChildBuilder
Global serialization (i.e. marshalling) configuration- Specified by:
serialization
in interfaceGlobalConfigurationChildBuilder
-
listenerThreadPool
public ThreadPoolConfigurationBuilder listenerThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the listener thread pool- Specified by:
listenerThreadPool
in interfaceGlobalConfigurationChildBuilder
-
asyncThreadPool
public ThreadPoolConfigurationBuilder asyncThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the asynchronous operations thread pool- Specified by:
asyncThreadPool
in interfaceGlobalConfigurationChildBuilder
-
expirationThreadPool
public ThreadPoolConfigurationBuilder expirationThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the expiration thread pool- Specified by:
expirationThreadPool
in interfaceGlobalConfigurationChildBuilder
-
persistenceThreadPool
public ThreadPoolConfigurationBuilder persistenceThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the persistence thread pool- Specified by:
persistenceThreadPool
in interfaceGlobalConfigurationChildBuilder
-
stateTransferThreadPool
public ThreadPoolConfigurationBuilder stateTransferThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the state-transfer thread pool- Specified by:
stateTransferThreadPool
in interfaceGlobalConfigurationChildBuilder
-
blockingThreadPool
public ThreadPoolConfigurationBuilder blockingThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the blocking thread pool- Specified by:
blockingThreadPool
in interfaceGlobalConfigurationChildBuilder
-
nonBlockingThreadPool
public ThreadPoolConfigurationBuilder nonBlockingThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the non blocking thread pool- Specified by:
nonBlockingThreadPool
in interfaceGlobalConfigurationChildBuilder
-
security
public GlobalSecurityConfigurationBuilder security()
Description copied from interface:GlobalConfigurationChildBuilder
Security-related configuration- Specified by:
security
in interfaceGlobalConfigurationChildBuilder
-
shutdown
public ShutdownConfigurationBuilder shutdown()
Description copied from interface:GlobalConfigurationChildBuilder
Shutdown configuration- Specified by:
shutdown
in interfaceGlobalConfigurationChildBuilder
-
site
public SiteConfigurationBuilder site()
Description copied from interface:GlobalConfigurationChildBuilder
Cross-site replication configuration- Specified by:
site
in interfaceGlobalConfigurationChildBuilder
-
modules
public List<Builder<?>> modules()
Description copied from interface:GlobalConfigurationChildBuilder
Global modules configuration- Specified by:
modules
in interfaceGlobalConfigurationChildBuilder
-
defaultCacheName
public GlobalConfigurationBuilder defaultCacheName(String 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
public GlobalConfiguration build()
Description copied from interface:GlobalConfigurationChildBuilder
Builds aGlobalConfiguration
object using the settings applied to this builder- Specified by:
build
in interfaceGlobalConfigurationChildBuilder
-
-