@Singleton
@Primary
@Requires(property="micronaut.session.http.coherence.enabled",
value="true")
@Replaces(value=io.micronaut.session.InMemorySessionStore.class)
public class CoherenceSessionStore
extends java.lang.Object
implements io.micronaut.session.SessionStore<CoherenceSessionStore.CoherenceHttpSession>, java.io.Serializable
SessionStore that uses Coherence to store session data.| Modifier and Type | Class and Description |
|---|---|
static class |
CoherenceSessionStore.CoherenceHttpSession
A representation of a http session.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COHERENCE_SESSION_ENABLED |
| Constructor and Description |
|---|
CoherenceSessionStore(io.micronaut.session.SessionIdGenerator sessionIdGenerator,
CoherenceHttpSessionConfiguration sessionConfiguration,
com.tangosol.net.NamedCache<java.lang.String,CoherenceSessionStore.CoherenceHttpSession> cache) |
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
deleteSession(java.lang.String id) |
java.util.concurrent.CompletableFuture<java.util.Optional<CoherenceSessionStore.CoherenceHttpSession>> |
findSession(java.lang.String id) |
CoherenceSessionStore.CoherenceHttpSession |
newSession() |
java.util.concurrent.CompletableFuture<CoherenceSessionStore.CoherenceHttpSession> |
save(CoherenceSessionStore.CoherenceHttpSession session) |
public static final java.lang.String COHERENCE_SESSION_ENABLED
public CoherenceSessionStore(io.micronaut.session.SessionIdGenerator sessionIdGenerator,
CoherenceHttpSessionConfiguration sessionConfiguration,
@Name(value="${micronaut.session.http.coherence.cache-name:http-sessions}")
com.tangosol.net.NamedCache<java.lang.String,CoherenceSessionStore.CoherenceHttpSession> cache)
public CoherenceSessionStore.CoherenceHttpSession newSession()
newSession in interface io.micronaut.session.SessionStore<CoherenceSessionStore.CoherenceHttpSession>public java.util.concurrent.CompletableFuture<java.util.Optional<CoherenceSessionStore.CoherenceHttpSession>> findSession(java.lang.String id)
findSession in interface io.micronaut.session.SessionStore<CoherenceSessionStore.CoherenceHttpSession>public java.util.concurrent.CompletableFuture<java.lang.Boolean> deleteSession(java.lang.String id)
deleteSession in interface io.micronaut.session.SessionStore<CoherenceSessionStore.CoherenceHttpSession>public java.util.concurrent.CompletableFuture<CoherenceSessionStore.CoherenceHttpSession> save(CoherenceSessionStore.CoherenceHttpSession session)
save in interface io.micronaut.session.SessionStore<CoherenceSessionStore.CoherenceHttpSession>