Class CoherenceSessionStore
Coherence based impelentation of ISessionStore.
Implements
Inherited Members
Namespace: Tangosol.Web
Assembly: Coherence.SessionStore.dll
Syntax
public class CoherenceSessionStore : ISessionStore
Constructors
CoherenceSessionStore(IOptions<CoherenceSessionOptions>, IHostEnvironment)
Initializes a new instance of the CoherenceSessionStore.
Declaration
public CoherenceSessionStore(IOptions<CoherenceSessionOptions> optionsAccessor, IHostEnvironment hostEnvironment)
Parameters
Type | Name | Description |
---|---|---|
IOptions<CoherenceSessionOptions> | optionsAccessor | |
IHostEnvironment | hostEnvironment |
Fields
m_ccf
Configurable Cache Factory
Declaration
protected IConfigurableCacheFactory m_ccf
Field Value
Type | Description |
---|---|
IConfigurableCacheFactory |
m_options
Coherence session options.
Declaration
protected readonly CoherenceSessionOptions m_options
Field Value
Type | Description |
---|---|
CoherenceSessionOptions |
Properties
ApplicationId
Application identifier.
Declaration
protected string ApplicationId { get; }
Property Value
Type | Description |
---|---|
string |
Methods
ConfigureCacheFactory(CoherenceSessionOptions)
Configures CacheFactory based on the supplied options or, if they are missing, on the defaults.
Declaration
protected void ConfigureCacheFactory(CoherenceSessionOptions options)
Parameters
Type | Name | Description |
---|---|---|
CoherenceSessionOptions | options |
Create(string, TimeSpan, TimeSpan, Func<bool>, bool)
Create a new or resume an ISession.
Declaration
public ISession Create(string sessionKey, TimeSpan idleTimeout, TimeSpan ioTimeout, Func<bool> tryEstablishSession, bool isNewSessionKey)
Parameters
Type | Name | Description |
---|---|---|
string | sessionKey | A unique key used to lookup the session. |
TimeSpan | idleTimeout | How long the session can be inactive (e.g. not accessed) before it will expire. |
TimeSpan | ioTimeout | The maximum amount of time LoadAsync(CancellationToken) and CommitAsync(CancellationToken) are allowed take. |
Func<bool> | tryEstablishSession | A callback invoked during Set(string, byte[]) to verify that modifying the session is currently valid. If the callback returns false, Set(string, byte[]) should throw an InvalidOperationException. SessionMiddleware provides a callback that returns false if the session was not established prior to sending the response. |
bool | isNewSessionKey | true if establishing a new session; false if resuming a session. |
Returns
Type | Description |
---|---|
ISession | The ISession that was created or resumed. |