Class CoherenceSessionStore
- java.lang.Object
-
- io.micronaut.coherence.httpsession.CoherenceSessionStore
-
- All Implemented Interfaces:
io.micronaut.session.SessionStore<CoherenceSessionStore.CoherenceHttpSession>
,java.io.Serializable
@Singleton @Primary @Requires(property="micronaut.session.http.coherence.enabled", value="true") @Replaces(io.micronaut.session.InMemorySessionStore.class) public class CoherenceSessionStore extends java.lang.Object implements io.micronaut.session.SessionStore<CoherenceSessionStore.CoherenceHttpSession>, java.io.Serializable
ASessionStore
that uses Coherence to store session data.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CoherenceSessionStore.CoherenceHttpSession
A representation of a http session.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
COHERENCE_SESSION_ENABLED
-
Constructor Summary
Constructors Constructor Description CoherenceSessionStore(io.micronaut.session.SessionIdGenerator sessionIdGenerator, CoherenceHttpSessionConfiguration sessionConfiguration, com.tangosol.net.NamedCache<java.lang.String,CoherenceSessionStore.CoherenceHttpSession> cache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Field Detail
-
COHERENCE_SESSION_ENABLED
public static final java.lang.String COHERENCE_SESSION_ENABLED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CoherenceSessionStore
public CoherenceSessionStore(io.micronaut.session.SessionIdGenerator sessionIdGenerator, CoherenceHttpSessionConfiguration sessionConfiguration, @Name("${micronaut.session.http.coherence.cache-name:http-sessions}") com.tangosol.net.NamedCache<java.lang.String,CoherenceSessionStore.CoherenceHttpSession> cache)
-
-
Method Detail
-
newSession
public CoherenceSessionStore.CoherenceHttpSession newSession()
- Specified by:
newSession
in interfaceio.micronaut.session.SessionStore<CoherenceSessionStore.CoherenceHttpSession>
-
findSession
public java.util.concurrent.CompletableFuture<java.util.Optional<CoherenceSessionStore.CoherenceHttpSession>> findSession(java.lang.String id)
- Specified by:
findSession
in interfaceio.micronaut.session.SessionStore<CoherenceSessionStore.CoherenceHttpSession>
-
deleteSession
public java.util.concurrent.CompletableFuture<java.lang.Boolean> deleteSession(java.lang.String id)
- Specified by:
deleteSession
in interfaceio.micronaut.session.SessionStore<CoherenceSessionStore.CoherenceHttpSession>
-
save
public java.util.concurrent.CompletableFuture<CoherenceSessionStore.CoherenceHttpSession> save(CoherenceSessionStore.CoherenceHttpSession session)
- Specified by:
save
in interfaceio.micronaut.session.SessionStore<CoherenceSessionStore.CoherenceHttpSession>
-
-