public class SessionStore extends Object
original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<SessionStore> |
__TYPE_ARG |
static int |
DEFAULT_SESSIONID_LENGTH
Default length for a session id.
|
Constructor and Description |
---|
SessionStore(Object delegate) |
SessionStore(SessionStore delegate) |
Modifier and Type | Method and Description |
---|---|
Completable |
clear()
Remove all sessions from the store.
|
void |
close()
Close the store
|
static SessionStore |
create(Vertx vertx)
Create a Session store given a backend and configuration JSON.
|
static SessionStore |
create(Vertx vertx,
JsonObject options)
Create a Session store given a backend and configuration JSON.
|
Session |
createSession(long timeout)
Create a new session using the default min length.
|
Session |
createSession(long timeout,
int length)
Create a new session.
|
Completable |
delete(String id)
Delete the session with the specified ID.
|
boolean |
equals(Object o) |
Maybe<Session> |
get(String cookieValue)
Get the session with the specified ID.
|
SessionStore |
getDelegate() |
int |
hashCode() |
SessionStore |
init(Vertx vertx,
JsonObject options)
Initialize this store.
|
static SessionStore |
newInstance(SessionStore arg) |
Completable |
put(Session session)
Add a session with the specified ID.
|
long |
retryTimeout()
The retry timeout value in milli seconds used by the session handler when it retrieves a value from the store.
A non positive value means there is no retry at all.
|
Completable |
rxClear()
Remove all sessions from the store.
|
Completable |
rxDelete(String id)
Delete the session with the specified ID.
|
Maybe<Session> |
rxGet(String cookieValue)
Get the session with the specified ID.
|
Completable |
rxPut(Session session)
Add a session with the specified ID.
|
Single<Integer> |
rxSize()
Get the number of sessions in the store.
|
Single<Integer> |
size()
Get the number of sessions in the store.
|
String |
toString() |
public static final io.vertx.lang.rx.TypeArg<SessionStore> __TYPE_ARG
public static final int DEFAULT_SESSIONID_LENGTH
public SessionStore(SessionStore delegate)
public SessionStore(Object delegate)
public SessionStore getDelegate()
public static SessionStore create(Vertx vertx)
vertx
- vertx instancepublic static SessionStore create(Vertx vertx, JsonObject options)
vertx
- vertx instanceoptions
- extra options for initializationpublic SessionStore init(Vertx vertx, JsonObject options)
vertx
- the vertx instanceoptions
- optional Json with extra configuration optionspublic long retryTimeout()
public Session createSession(long timeout)
timeout
- - the session timeout, in mspublic Session createSession(long timeout, int length)
timeout
- - the session timeout, in mslength
- - the required length for the session idpublic Maybe<Session> get(String cookieValue)
cookieValue
- the unique ID of the sessionpublic Maybe<Session> rxGet(String cookieValue)
cookieValue
- the unique ID of the sessionpublic Completable delete(String id)
id
- the session idpublic Completable rxDelete(String id)
id
- the session idpublic Completable put(Session session)
session
- the sessionpublic Completable rxPut(Session session)
session
- the sessionpublic Completable clear()
public Completable rxClear()
public Single<Integer> size()
Beware of the result which is just an estimate, in particular with distributed session stores.
public Single<Integer> rxSize()
Beware of the result which is just an estimate, in particular with distributed session stores.
public void close()
public static SessionStore newInstance(SessionStore arg)
Copyright © 2022 Eclipse. All rights reserved.