public interface SessionStore
Modifier and Type | Method and Description |
---|---|
void |
clear(Handler<AsyncResult<Boolean>> resultHandler)
Remove all sessions from the store
|
void |
close()
Close the store
|
Session |
createSession(long timeout)
Create a new session
|
void |
delete(String id,
Handler<AsyncResult<Boolean>> resultHandler)
Delete the session with the specified ID
|
void |
get(String id,
Handler<AsyncResult<Session>> resultHandler)
Get the session with the specified ID
|
void |
put(Session session,
Handler<AsyncResult<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.
A non positive value means there is no retry at all.
|
void |
size(Handler<AsyncResult<Integer>> resultHandler)
Get the number of sessions in the store
|
long retryTimeout()
Session createSession(long timeout)
timeout
- - the session timeout, in msvoid get(String id, Handler<AsyncResult<Session>> resultHandler)
id
- the unique ID of the sessionresultHandler
- will be called with a result holding the session, or a failurevoid delete(String id, Handler<AsyncResult<Boolean>> resultHandler)
id
- the unique ID of the sessionresultHandler
- will be called with a result true/false, or a failurevoid put(Session session, Handler<AsyncResult<Boolean>> resultHandler)
session
- the sessionresultHandler
- will be called with a result true/false, or a failurevoid clear(Handler<AsyncResult<Boolean>> resultHandler)
resultHandler
- will be called with a result true/false, or a failurevoid size(Handler<AsyncResult<Integer>> resultHandler)
resultHandler
- will be called with the number, or a failurevoid close()
Copyright © 2016. All rights reserved.