public final class ClusteringServiceConfigurationBuilder extends java.lang.Object implements org.ehcache.config.Builder<ClusteringServiceConfiguration>
Modifier and Type | Method and Description |
---|---|
ServerSideConfigurationBuilder |
autoCreate()
Deprecated.
in favor of
autoCreate(UnaryOperator) |
ClusteringServiceConfigurationBuilder |
autoCreate(java.util.function.UnaryOperator<ServerSideConfigurationBuilder> serverSideConfig)
Support connection to an existing entity or create if the entity if absent.
|
ClusteringServiceConfigurationBuilder |
autoCreateOnReconnect(java.util.function.UnaryOperator<ServerSideConfigurationBuilder> serverSideConfig)
Support connection to an existing entity or create if the entity if absent on initial connection or any subsequent reconnect attempt.
|
ClusteringServiceConfiguration |
build() |
static ClusteringServiceConfigurationBuilder |
cluster(java.lang.Iterable<java.net.InetSocketAddress> servers,
java.lang.String clusterTierManager)
Creates a new builder connecting to the given cluster.
|
static ClusteringServiceConfigurationBuilder |
cluster(java.net.URI clusterUri)
Creates a new builder connecting to the given cluster.
|
ServerSideConfigurationBuilder |
expecting()
Deprecated.
in favor of
expecting(UnaryOperator) |
ClusteringServiceConfigurationBuilder |
expecting(java.util.function.UnaryOperator<ServerSideConfigurationBuilder> serverSideConfig)
Only support connection to an existing entity.
|
ClusteringServiceConfigurationBuilder |
readOperationTimeout(long duration,
java.util.concurrent.TimeUnit unit)
Deprecated.
Use
timeouts(Timeouts) . Note that calling this method will override any timeouts previously set
by setting the read operation timeout to the specified value and everything else to its default. |
static ClusteringServiceConfigurationBuilder |
seededFrom(ClusteringServiceConfiguration configuration)
Creates a new builder seeded from an existing configuration.
|
ClusteringServiceConfigurationBuilder |
timeouts(org.ehcache.config.Builder<? extends Timeouts> timeoutsBuilder)
Adds timeouts.
|
ClusteringServiceConfigurationBuilder |
timeouts(Timeouts timeouts)
Adds timeouts.
|
ClusteringServiceConfigurationBuilder |
usingServers(java.lang.Iterable<java.net.InetSocketAddress> servers)
Reconfigure to connect to a different cluster.
|
ClusteringServiceConfigurationBuilder |
usingServers(java.lang.Iterable<java.net.InetSocketAddress> servers,
java.lang.String clusterTierManager)
Reconfigure to connect to a different cluster and manager name.
|
ClusteringServiceConfigurationBuilder |
usingUri(java.net.URI clusterUri)
Reconfigure to connect to a different URI.
|
public static ClusteringServiceConfigurationBuilder cluster(java.net.URI clusterUri)
clusterUri
- cluster URIpublic static ClusteringServiceConfigurationBuilder cluster(java.lang.Iterable<java.net.InetSocketAddress> servers, java.lang.String clusterTierManager)
servers
- the non-null
iterable of servers in the clusterclusterTierManager
- the non-null
cluster tier manager identifierpublic static ClusteringServiceConfigurationBuilder seededFrom(ClusteringServiceConfiguration configuration)
configuration
- existing clustering configurationpublic ClusteringServiceConfigurationBuilder usingUri(java.net.URI clusterUri)
public ClusteringServiceConfigurationBuilder usingServers(java.lang.Iterable<java.net.InetSocketAddress> servers)
public ClusteringServiceConfigurationBuilder usingServers(java.lang.Iterable<java.net.InetSocketAddress> servers, java.lang.String clusterTierManager)
@Deprecated public ServerSideConfigurationBuilder autoCreate()
autoCreate(UnaryOperator)
@Deprecated public ServerSideConfigurationBuilder expecting()
expecting(UnaryOperator)
public ClusteringServiceConfigurationBuilder autoCreate(java.util.function.UnaryOperator<ServerSideConfigurationBuilder> serverSideConfig)
An empty server-side configuration can be created by performing no operations on the supplied builder:
builder.autoCreate(b -> b)
public ClusteringServiceConfigurationBuilder autoCreateOnReconnect(java.util.function.UnaryOperator<ServerSideConfigurationBuilder> serverSideConfig)
An empty server-side configuration can be created by performing no operations on the supplied builder:
builder.autoCreateOnReconnect(b -> b)
public ClusteringServiceConfigurationBuilder expecting(java.util.function.UnaryOperator<ServerSideConfigurationBuilder> serverSideConfig)
An empty server-side configuration can be requested by performing no operations on the supplied builder:
builder.expecting(b -> b)
public ClusteringServiceConfigurationBuilder timeouts(Timeouts timeouts)
timeouts
- the amount of time permitted for all operationsjava.lang.NullPointerException
- if timeouts
is null
public ClusteringServiceConfigurationBuilder timeouts(org.ehcache.config.Builder<? extends Timeouts> timeoutsBuilder)
timeoutsBuilder
- the builder for amount of time permitted for all operationsjava.lang.NullPointerException
- if timeouts
is null
@Deprecated public ClusteringServiceConfigurationBuilder readOperationTimeout(long duration, java.util.concurrent.TimeUnit unit)
timeouts(Timeouts)
. Note that calling this method will override any timeouts previously set
by setting the read operation timeout to the specified value and everything else to its default.duration
- the amount of time permitted for read operationsunit
- the time units for duration
java.lang.NullPointerException
- if unit
is null
java.lang.IllegalArgumentException
- if amount
is negativepublic ClusteringServiceConfiguration build()
build
in interface org.ehcache.config.Builder<ClusteringServiceConfiguration>