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 |
---|---|
void |
clear(Handler<AsyncResult<Void>> resultHandler)
Remove all sessions from the store.
|
Observable<Void> |
clearObservable()
Deprecated.
use
rxClear() instead |
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.
|
void |
delete(String id,
Handler<AsyncResult<Void>> resultHandler)
Delete the session with the specified ID.
|
Observable<Void> |
deleteObservable(String id)
Deprecated.
use
rxDelete(java.lang.String) instead |
boolean |
equals(Object o) |
void |
get(String cookieValue,
Handler<AsyncResult<Session>> resultHandler)
Get the session with the specified ID.
|
SessionStore |
getDelegate() |
Observable<Session> |
getObservable(String cookieValue)
Deprecated.
use
rxGet(java.lang.String) instead |
int |
hashCode() |
SessionStore |
init(Vertx vertx,
JsonObject options)
Initialize this store.
|
static SessionStore |
newInstance(SessionStore arg) |
void |
put(Session session,
Handler<AsyncResult<Void>> resultHandler)
Add a session with the specified ID.
|
Observable<Void> |
putObservable(Session session)
Deprecated.
use
rxPut(io.vertx.rxjava.ext.web.Session) instead |
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.
|
Single<Void> |
rxClear()
Remove all sessions from the store.
|
Single<Void> |
rxDelete(String id)
Delete the session with the specified ID.
|
Single<Session> |
rxGet(String cookieValue)
Get the session with the specified ID.
|
Single<Void> |
rxPut(Session session)
Add a session with the specified ID.
|
Single<Integer> |
rxSize()
Get the number of sessions in the store.
|
void |
size(Handler<AsyncResult<Integer>> resultHandler)
Get the number of sessions in the store.
|
Observable<Integer> |
sizeObservable()
Deprecated.
use
rxSize() instead |
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 void get(String cookieValue, Handler<AsyncResult<Session>> resultHandler)
cookieValue
- the unique ID of the sessionresultHandler
- will be called with a result holding the session, or a failure@Deprecated public Observable<Session> getObservable(String cookieValue)
rxGet(java.lang.String)
insteadcookieValue
- the unique ID of the sessionpublic Single<Session> rxGet(String cookieValue)
cookieValue
- the unique ID of the sessionpublic void delete(String id, Handler<AsyncResult<Void>> resultHandler)
id
- the session idresultHandler
- will be called with a success or a failure@Deprecated public Observable<Void> deleteObservable(String id)
rxDelete(java.lang.String)
insteadid
- the session idpublic Single<Void> rxDelete(String id)
id
- the session idpublic void put(Session session, Handler<AsyncResult<Void>> resultHandler)
session
- the sessionresultHandler
- will be called with a success or a failure@Deprecated public Observable<Void> putObservable(Session session)
rxPut(io.vertx.rxjava.ext.web.Session)
insteadsession
- the sessionpublic Single<Void> rxPut(Session session)
session
- the sessionpublic void clear(Handler<AsyncResult<Void>> resultHandler)
resultHandler
- will be called with a success or a failure@Deprecated public Observable<Void> clearObservable()
rxClear()
insteadpublic void size(Handler<AsyncResult<Integer>> resultHandler)
Beware of the result which is just an estimate, in particular with distributed session stores.
resultHandler
- will be called with the number, or a failure@Deprecated public Observable<Integer> sizeObservable()
rxSize()
insteadBeware 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 © 2023 Eclipse. All rights reserved.