A session store is used to store sessions for an Vert.x-Web web app
Constructor and description |
---|
SessionStore
(java.lang.Object delegate) |
Type | Name and description |
---|---|
void |
clear(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>> resultHandler) Remove all sessions from the store |
void |
close() Close the store |
Session |
createSession(long timeout) Create a new session |
void |
delete(java.lang.String id, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>> resultHandler) Delete the session with the specified ID |
void |
get(java.lang.String id, io.vertx.core.Handler<io.vertx.core.AsyncResult<Session>> resultHandler) Get the session with the specified ID |
java.lang.Object |
getDelegate() |
void |
put(Session session, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>> resultHandler) 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. |
void |
size(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Integer>> resultHandler) Get the number of sessions in the store |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Remove all sessions from the store
resultHandler
- will be called with a result true/false, or a failureClose the store
Create a new session
timeout
- - the session timeout, in msDelete the session with the specified ID
id
- the unique ID of the sessionresultHandler
- will be called with a result true/false, or a failureGet the session with the specified ID
id
- the unique ID of the sessionresultHandler
- will be called with a result holding the session, or a failureAdd a session with the specified ID
session
- the sessionresultHandler
- will be called with a result true/false, or a failureThe 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.Get the number of sessions in the store
resultHandler
- will be called with the number, or a failure