Interface SessionConfiguration
- All Superinterfaces:
 Comparable<SessionConfiguration>
- All Known Subinterfaces:
 SessionInitializer
- All Known Implementing Classes:
 SessionConfiguration.ConfigurableCacheFactorySessionConfig,WrapperSessionConfiguration
Session.- Since:
 - 20.12
 - Author:
 - Jonathan Knight 2020.11.03
 
- 
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classA builder to build aSessionConfiguration.ConfigurableCacheFactorySessionConfig.static classAn immutableSessionConfigurationto configure aSessionthat wraps an underlyingConfigurableCacheFactory. - 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default priority for a configuration. - 
Method Summary
Modifier and TypeMethodDescriptionstatic SessionConfiguration.Builderbuilder()Create aSessionConfigurationbuilder.default intcompareTo(SessionConfiguration other) Order SessionConfiguration by priority, the lowest priority comes first.static SessionConfigurationCreate aSessionConfigurationfor the defaultSessionwith the specified configuration file.static SessionConfigurationCreate aSessionConfigurationfor aSessionwith a specific name and configuration file.static SessionConfigurationCreate aSessionConfigurationfor aSessionwith a specific name and configuration file.static SessionConfigurationCreate aSessionConfigurationfor the defaultSession.default Optional<ClassLoader> Return the optionalClassLoaderto use for the session.Return the optional configuration file URI for a session that wraps aConfigurableCacheFactory.default Iterable<EventInterceptor<?>> Return the interceptors to add to the session.default Optional<Coherence.Mode> getMode()Return an optionalCoherence.Modethat the session should use to set thecoherence.clientproperty.getName()Return the name of theSession.default Optional<ParameterResolver> Returns an optionalParameterResolverto use to resolve configuration parameters when creating the session.default intReturns the priority for this configuration.Return the scope name of theSession.default booleanReturntrueif this configuration is enabled and should be used to configure a session.default Optional<SessionProvider> Return theSessionProviderto use to create a session. 
- 
Field Details
- 
DEFAULT_PRIORITY
static final int DEFAULT_PRIORITYThe default priority for a configuration.- See Also:
 
 
 - 
 - 
Method Details
- 
getName
String getName()Return the name of theSession.If not specifically set the
Coherence.DEFAULT_NAMEwill be used.A session name must be unique.
- Returns:
 - the name of the 
Session 
 - 
getScopeName
String getScopeName()Return the scope name of theSession.If not specifically set, the name will default to the
getName()value. If thegetName()isCoherence.DEFAULT_NAMEno scope will be used.- Returns:
 - the scope name of the 
Session 
 - 
getInterceptors
Return the interceptors to add to the session.- Returns:
 - the interceptors to add to the session
 
 - 
isEnabled
default boolean isEnabled()Returntrueif this configuration is enabled and should be used to configure a session.- Returns:
 trueif this configuration is enabled
 - 
getConfigUri
Return the optional configuration file URI for a session that wraps aConfigurableCacheFactory.- Returns:
 - the optional configuration file URI for a session that
         wraps a 
ConfigurableCacheFactory 
 - 
getClassLoader
Return the optionalClassLoaderto use for the session.- Returns:
 - the optional 
ClassLoaderto use for the session 
 - 
getPriority
default int getPriority()Returns the priority for this configuration.Sessions will be created in priority order, the highest priority first.
The default priority is zero (see
DEFAULT_PRIORITY).- Returns:
 - the priority for this configuration
 
 - 
compareTo
Order SessionConfiguration by priority, the lowest priority comes first.- Specified by:
 compareToin interfaceComparable<SessionConfiguration>- Parameters:
 other- the configuration to compare to- Returns:
 - compare this configuration with the specified configuration ordering by priority
 
 - 
getParameterResolver
Returns an optionalParameterResolverto use to resolve configuration parameters when creating the session.- Returns:
 - an optional 
ParameterResolverto use to resolve configuration parameters 
 - 
getMode
Return an optionalCoherence.Modethat the session should use to set thecoherence.clientproperty.- Returns:
 - an optional 
Coherence.Modethat the session should use to set thecoherence.clientproperty 
 - 
sessionProvider
Return theSessionProviderto use to create a session.- Returns:
 - the 
SessionProviderto use to create a session 
 - 
builder
Create aSessionConfigurationbuilder.- Returns:
 - a 
SessionConfigurationbuilder 
 - 
defaultSession
Create aSessionConfigurationfor the defaultSession.The default session will wrap a
ConfigurableCacheFactorythat is configured from the default cache configuration file.The default session will have a name
Coherence.DEFAULT_NAMEand the default scope nameCoherence.DEFAULT_SCOPE.- Returns:
 - a 
SessionConfigurationfor the defaultSession 
 - 
create
Create aSessionConfigurationfor the defaultSessionwith the specified configuration file.The default session will wrap a
ConfigurableCacheFactorythat is configured from the default cache configuration file.The default session will have a name
Coherence.DEFAULT_NAMEand the default scope nameCoherence.DEFAULT_SCOPE.- Parameters:
 sConfigURI- the location of the configuration file to use- Returns:
 - a 
SessionConfigurationfor the defaultSession 
 - 
create
Create aSessionConfigurationfor aSessionwith a specific name and configuration file.The session will have a scope name
Coherence.DEFAULT_SCOPE.- Parameters:
 sName- the name of the sessionsConfigURI- the location of the configuration file to use- Returns:
 - a 
SessionConfiguration 
 - 
create
Create aSessionConfigurationfor aSessionwith a specific name and configuration file.- Parameters:
 sName- the name of the sessionsConfigURI- the location of the configuration file to usesScopeName- the scope name to use for the session- Returns:
 - a 
SessionConfiguration 
 
 -