Package com.tangosol.net
Class WrapperSessionConfiguration
- java.lang.Object
-
- com.tangosol.net.WrapperSessionConfiguration
-
- All Implemented Interfaces:
SessionConfiguration
,Comparable<SessionConfiguration>
public class WrapperSessionConfiguration extends Object implements SessionConfiguration
ASessionConfiguration
that delegates to anotherSessionConfiguration
.- Since:
- 22.06.2
- Author:
- Jonathan Knight 2022.08.25
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.tangosol.net.SessionConfiguration
SessionConfiguration.Builder, SessionConfiguration.ConfigurableCacheFactorySessionConfig
-
-
Field Summary
-
Fields inherited from interface com.tangosol.net.SessionConfiguration
DEFAULT_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description WrapperSessionConfiguration(SessionConfiguration delegate)
Create aWrapperSessionConfiguration
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(SessionConfiguration other)
Order SessionConfiguration by priority, the lowest priority comes first.Optional<ClassLoader>
getClassLoader()
Return the optionalClassLoader
to use for the session.Optional<String>
getConfigUri()
Return the optional configuration file URI for a session that wraps aConfigurableCacheFactory
.Iterable<EventInterceptor<?>>
getInterceptors()
Return the interceptors to add to the session.Optional<Coherence.Mode>
getMode()
Return an optionalCoherence.Mode
that the session should use to set thecoherence.client
property.String
getName()
Return the name of theSession
.Optional<ParameterResolver>
getParameterResolver()
Returns an optionalParameterResolver
to use to resolve configuration parameters when creating the session.int
getPriority()
Returns the priority for this configuration.String
getScopeName()
Return the scope name of theSession
.boolean
isEnabled()
Returntrue
if this configuration is enabled and should be used to configure a session.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.tangosol.net.SessionConfiguration
sessionProvider
-
-
-
-
Constructor Detail
-
WrapperSessionConfiguration
public WrapperSessionConfiguration(SessionConfiguration delegate)
Create aWrapperSessionConfiguration
.- Parameters:
delegate
- theSessionConfiguration
to delegate to- Throws:
NullPointerException
- if the delegate isnull
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:SessionConfiguration
Return the name of theSession
.If not specifically set the
Coherence.DEFAULT_NAME
will be used.A session name must be unique.
- Specified by:
getName
in interfaceSessionConfiguration
- Returns:
- the name of the
Session
-
getScopeName
public String getScopeName()
Description copied from interface:SessionConfiguration
Return the scope name of theSession
.If not specifically set, the name will default to the
SessionConfiguration.getName()
value. If theSessionConfiguration.getName()
isCoherence.DEFAULT_NAME
no scope will be used.- Specified by:
getScopeName
in interfaceSessionConfiguration
- Returns:
- the scope name of the
Session
-
getInterceptors
public Iterable<EventInterceptor<?>> getInterceptors()
Description copied from interface:SessionConfiguration
Return the interceptors to add to the session.- Specified by:
getInterceptors
in interfaceSessionConfiguration
- Returns:
- the interceptors to add to the session
-
isEnabled
public boolean isEnabled()
Description copied from interface:SessionConfiguration
Returntrue
if this configuration is enabled and should be used to configure a session.- Specified by:
isEnabled
in interfaceSessionConfiguration
- Returns:
true
if this configuration is enabled
-
getConfigUri
public Optional<String> getConfigUri()
Description copied from interface:SessionConfiguration
Return the optional configuration file URI for a session that wraps aConfigurableCacheFactory
.- Specified by:
getConfigUri
in interfaceSessionConfiguration
- Returns:
- the optional configuration file URI for a session that
wraps a
ConfigurableCacheFactory
-
getClassLoader
public Optional<ClassLoader> getClassLoader()
Description copied from interface:SessionConfiguration
Return the optionalClassLoader
to use for the session.- Specified by:
getClassLoader
in interfaceSessionConfiguration
- Returns:
- the optional
ClassLoader
to use for the session
-
getPriority
public int getPriority()
Description copied from interface:SessionConfiguration
Returns the priority for this configuration.Sessions will be created in priority order, the highest priority first.
The default priority is zero (see
SessionConfiguration.DEFAULT_PRIORITY
).- Specified by:
getPriority
in interfaceSessionConfiguration
- Returns:
- the priority for this configuration
-
compareTo
public int compareTo(SessionConfiguration other)
Description copied from interface:SessionConfiguration
Order SessionConfiguration by priority, the lowest priority comes first.- Specified by:
compareTo
in interfaceComparable<SessionConfiguration>
- Specified by:
compareTo
in interfaceSessionConfiguration
- Parameters:
other
- the configuration to compare to- Returns:
- compare this configuration with the specified configuration ordering by priority
-
getParameterResolver
public Optional<ParameterResolver> getParameterResolver()
Description copied from interface:SessionConfiguration
Returns an optionalParameterResolver
to use to resolve configuration parameters when creating the session.- Specified by:
getParameterResolver
in interfaceSessionConfiguration
- Returns:
- an optional
ParameterResolver
to use to resolve configuration parameters
-
getMode
public Optional<Coherence.Mode> getMode()
Description copied from interface:SessionConfiguration
Return an optionalCoherence.Mode
that the session should use to set thecoherence.client
property.- Specified by:
getMode
in interfaceSessionConfiguration
- Returns:
- an optional
Coherence.Mode
that the session should use to set thecoherence.client
property
-
-