Class CoherenceSessionStore
java.lang.Object
io.micronaut.coherence.httpsession.CoherenceSessionStore
- All Implemented Interfaces:
io.micronaut.session.SessionStore<CoherenceSessionStore.CoherenceHttpSession>
,Serializable
@Singleton
@Primary
@Requires(property="micronaut.session.http.coherence.enabled",
value="true")
@Replaces(io.micronaut.session.InMemorySessionStore.class)
public class CoherenceSessionStore
extends Object
implements io.micronaut.session.SessionStore<CoherenceSessionStore.CoherenceHttpSession>, Serializable
A
SessionStore
that uses Coherence to store session data.- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A representation of a http session. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
System property to enableCoherence
as an HTTP session store. -
Constructor Summary
ConstructorDescriptionCoherenceSessionStore
(io.micronaut.session.SessionIdGenerator sessionIdGenerator, CoherenceHttpSessionConfiguration sessionConfiguration, com.tangosol.net.NamedCache<String, CoherenceSessionStore.CoherenceHttpSession> cache) Constructs a newCoherenceSessionStore
. -
Method Summary
-
Field Details
-
COHERENCE_SESSION_ENABLED
System property to enableCoherence
as an HTTP session store.- See Also:
-
-
Constructor Details
-
CoherenceSessionStore
public CoherenceSessionStore(io.micronaut.session.SessionIdGenerator sessionIdGenerator, CoherenceHttpSessionConfiguration sessionConfiguration, @Name("${micronaut.session.http.coherence.cache-name:http-sessions}") com.tangosol.net.NamedCache<String, CoherenceSessionStore.CoherenceHttpSession> cache) Constructs a newCoherenceSessionStore
.- Parameters:
sessionIdGenerator
- thesession id generator
.sessionConfiguration
- thesession configuration
cache
- TheNamedCache
storing the sessions
-
-
Method Details
-
newSession
- Specified by:
newSession
in interfaceio.micronaut.session.SessionStore<CoherenceSessionStore.CoherenceHttpSession>
-
findSession
public CompletableFuture<Optional<CoherenceSessionStore.CoherenceHttpSession>> findSession(String id) - Specified by:
findSession
in interfaceio.micronaut.session.SessionStore<CoherenceSessionStore.CoherenceHttpSession>
-
deleteSession
- Specified by:
deleteSession
in interfaceio.micronaut.session.SessionStore<CoherenceSessionStore.CoherenceHttpSession>
-
save
public CompletableFuture<CoherenceSessionStore.CoherenceHttpSession> save(CoherenceSessionStore.CoherenceHttpSession session) - Specified by:
save
in interfaceio.micronaut.session.SessionStore<CoherenceSessionStore.CoherenceHttpSession>
-