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
Nested ClassesModifier and TypeClassDescriptionstatic classA representation of a http session. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSystem property to enableCoherenceas an HTTP session store. -
Constructor Summary
ConstructorsConstructorDescriptionCoherenceSessionStore(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 enableCoherenceas 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 configurationcache- TheNamedCachestoring the sessions
-
-
Method Details
-
newSession
- Specified by:
newSessionin interfaceio.micronaut.session.SessionStore<CoherenceSessionStore.CoherenceHttpSession>
-
findSession
public CompletableFuture<Optional<CoherenceSessionStore.CoherenceHttpSession>> findSession(String id) - Specified by:
findSessionin interfaceio.micronaut.session.SessionStore<CoherenceSessionStore.CoherenceHttpSession>
-
deleteSession
- Specified by:
deleteSessionin interfaceio.micronaut.session.SessionStore<CoherenceSessionStore.CoherenceHttpSession>
-
save
public CompletableFuture<CoherenceSessionStore.CoherenceHttpSession> save(CoherenceSessionStore.CoherenceHttpSession session) - Specified by:
savein interfaceio.micronaut.session.SessionStore<CoherenceSessionStore.CoherenceHttpSession>
-