Package com.tangosol.net
Class SessionConfiguration.Builder
java.lang.Object
com.tangosol.net.SessionConfiguration.Builder
- Enclosing interface:
SessionConfiguration
A builder to build a
SessionConfiguration.ConfigurableCacheFactorySessionConfig
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build theSessionConfiguration
.Set the session'scoherence.client
parameter to "direct".Set the session'scoherence.client
parameter to "remote-fixed".Set the session'scoherence.client
parameter to "remote".Set the name for the session to be created.withClassLoader
(ClassLoader loader) Set theClassLoader
for the session to be created.withConfigUri
(String sURI) Set the cache configuration URI for the session to be created.withInterceptor
(EventInterceptor<?> interceptor) Add anEventInterceptor
to add to the sessionwithMode
(Coherence.Mode mode) Set theCoherence.Mode
to use, which will override any mode used by theCoherence
instance.withParameter
(Parameter parameter) Add a named parameter to use when resolving configuration parameters.withParameter
(String sName, Expression<?> expression) Add a named parameter to use when resolving configuration parameters.withParameter
(String sName, Object oValue) Add a named parameter to use when resolving configuration parameters.withParameterResolver
(ParameterResolver resolver) Set the optionalParameterResolver
to use to resolve configuration parameters.withPriority
(int nPriority) Set the session creation priority.withScopeName
(String sScope) Set the scope name for the session to be created.withSessionProvider
(SessionProvider provider) Set theSessionProvider
to use.
-
Method Details
-
named
Set the name for the session to be created.- Parameters:
sName
- the name for the session to be created- Returns:
- this
SessionConfiguration.Builder
-
withConfigUri
Set the cache configuration URI for the session to be created.- Parameters:
sURI
- the cache configuration URI for the session to be created- Returns:
- this
SessionConfiguration.Builder
-
withClassLoader
Set theClassLoader
for the session to be created.- Parameters:
loader
- theClassLoader
for the session to be created- Returns:
- this
SessionConfiguration.Builder
-
withScopeName
Set the scope name for the session to be created.- Parameters:
sScope
- the scope name for the session to be created- Returns:
- this
SessionConfiguration.Builder
-
withInterceptor
Add anEventInterceptor
to add to the sessionIt is important that the interceptor is able to intercept the event types from the session being configured. Ideally use an implementation of
EventDispatcherAwareInterceptor
so that the interceptor can determine whether it should be registered with a specific session event dispatcher.- Parameters:
interceptor
- anEventInterceptor
to add to the session- Returns:
- this
SessionConfiguration.Builder
-
withPriority
Set the session creation priority.- Parameters:
nPriority
- the session creation priority- Returns:
- this
SessionConfiguration.Builder
- See Also:
-
withParameterResolver
Set the optionalParameterResolver
to use to resolve configuration parameters.Any parameter added directly with one of the
addParameter
methods will take precedence over the parameters in the specified resolver.- Parameters:
resolver
- the optionalParameterResolver
to use to resolve configuration parameters- Returns:
- this
SessionConfiguration.Builder
- See Also:
-
withParameter
Add a named parameter to use when resolving configuration parameters.- Parameters:
sName
- the name of the parameteroValue
- the parameter value- Returns:
- this
SessionConfiguration.Builder
-
withParameter
Add a named parameter to use when resolving configuration parameters.- Parameters:
sName
- the name of the parameterexpression
- the parameterExpression
to use to resolve the parameter value- Returns:
- this
SessionConfiguration.Builder
-
withParameter
Add a named parameter to use when resolving configuration parameters.- Parameters:
parameter
- the namedParameter
- Returns:
- this
SessionConfiguration.Builder
-
clientRemote
Set the session'scoherence.client
parameter to "remote".- Returns:
- this
SessionConfiguration.Builder
-
clientFixed
Set the session'scoherence.client
parameter to "remote-fixed".- Returns:
- this
SessionConfiguration.Builder
-
clientDirect
Set the session'scoherence.client
parameter to "direct".- Returns:
- this
SessionConfiguration.Builder
-
withMode
Set theCoherence.Mode
to use, which will override any mode used by theCoherence
instance.- Parameters:
mode
- theCoherence.Mode
to use- Returns:
- this
SessionConfiguration.Builder
-
withSessionProvider
Set theSessionProvider
to use.- Parameters:
provider
- theSessionProvider
to use- Returns:
- this
SessionConfiguration.Builder
-
build
Build theSessionConfiguration
.- Returns:
- the
SessionConfiguration
-