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.clientparameter to "direct".Set the session'scoherence.clientparameter to "remote-fixed".Set the session'scoherence.clientparameter to "remote".Set the name for the session to be created.withClassLoader(ClassLoader loader) Set theClassLoaderfor the session to be created.withConfigUri(String sURI) Set the cache configuration URI for the session to be created.withInterceptor(EventInterceptor<?> interceptor) Add anEventInterceptorto add to the sessionwithMode(Coherence.Mode mode) Set theCoherence.Modeto use, which will override any mode used by theCoherenceinstance.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 optionalParameterResolverto 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 theSessionProviderto 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 theClassLoaderfor the session to be created.- Parameters:
loader- theClassLoaderfor 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 anEventInterceptorto 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
EventDispatcherAwareInterceptorso that the interceptor can determine whether it should be registered with a specific session event dispatcher.- Parameters:
interceptor- anEventInterceptorto 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 optionalParameterResolverto use to resolve configuration parameters.Any parameter added directly with one of the
addParametermethods will take precedence over the parameters in the specified resolver.- Parameters:
resolver- the optionalParameterResolverto 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 parameterExpressionto 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.clientparameter to "remote".- Returns:
- this
SessionConfiguration.Builder
-
clientFixed
Set the session'scoherence.clientparameter to "remote-fixed".- Returns:
- this
SessionConfiguration.Builder
-
clientDirect
Set the session'scoherence.clientparameter to "direct".- Returns:
- this
SessionConfiguration.Builder
-
withMode
Set theCoherence.Modeto use, which will override any mode used by theCoherenceinstance.- Parameters:
mode- theCoherence.Modeto use- Returns:
- this
SessionConfiguration.Builder
-
withSessionProvider
Set theSessionProviderto use.- Parameters:
provider- theSessionProviderto use- Returns:
- this
SessionConfiguration.Builder
-
build
Build theSessionConfiguration.- Returns:
- the
SessionConfiguration
-