Module io.inverno.mod.session
Package io.inverno.mod.session
Class AbstractSessionStore.Builder<A,B extends Session<A>,C extends AbstractSessionStore<A,B>,D extends AbstractSessionStore.Builder<A,B,C,D>>
java.lang.Object
io.inverno.mod.session.AbstractSessionStore.Builder<A,B,C,D>
- Type Parameters:
A
- the session data typeB
- the session typeC
- the session store typeD
- the session store builder type
- Direct Known Subclasses:
InMemoryBasicSessionStore.Builder
,InMemoryJWTSessionStore.Builder
,RedisBasicSessionStore.Builder
,RedisJWTSessionStore.Builder
- Enclosing class:
AbstractSessionStore<A,
B extends Session<A>>
protected abstract static class AbstractSessionStore.Builder<A,B extends Session<A>,C extends AbstractSessionStore<A,B>,D extends AbstractSessionStore.Builder<A,B,C,D>>
extends Object
A base session store builder.
- Since:
- 1.13
- Author:
- Jeremy Kuhn
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Long
The period in milliseconds after a which a new session must expire.protected Long
The initial maximum inactive interval in milliseconds to set when creating a new session.protected final SessionIdGenerator
<A, B> The session id generator. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Builder
(SessionIdGenerator<A, B> sessionIdGenerator) Creates a base session store builder. -
Method Summary
Modifier and TypeMethodDescriptionabstract C
build()
Builds a session store.expireAfterPeriod
(long expireAfterPeriod) Sets the period in milliseconds after a which a new session must expire.maxInactiveInterval
(long maxInactiveInterval) Sets the initial maximum inactive interval in milliseconds to set when creating a new session.
-
Field Details
-
sessionIdGenerator
The session id generator. -
maxInactiveInterval
The initial maximum inactive interval in milliseconds to set when creating a new session. -
expireAfterPeriod
The period in milliseconds after a which a new session must expire.
-
-
Constructor Details
-
Builder
Creates a base session store builder.
- Parameters:
sessionIdGenerator
- a session id generator
-
-
Method Details
-
maxInactiveInterval
Sets the initial maximum inactive interval in milliseconds to set when creating a new session.
- Parameters:
maxInactiveInterval
- a maximum inactive interval in milliseconds- Returns:
- the builder
-
expireAfterPeriod
Sets the period in milliseconds after a which a new session must expire.
- Parameters:
expireAfterPeriod
- a period in milliseconds- Returns:
- the builder
-
build
Builds a session store.
- Returns:
- a new session store
-