Class LocalSessionStore
- All Implemented Interfaces:
MutinyDelegate
This store is appropriate if you have just a single Vert.x instance and you are using sticky sessions in your application and have configured your load balancer to always route HTTP requests to the same Vert.x instance.
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- Author:
- Tim Fox, Paulo Lopes
- See Also:
-
LocalSessionStore
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TypeArg<LocalSessionStore>static final longDefault of how often, in ms, to check for expired sessionsstatic final StringDefault name for map used to store sessionsFields inherited from class io.vertx.mutiny.ext.web.sstore.SessionStore
DEFAULT_SESSIONID_LENGTH -
Constructor Summary
ConstructorsConstructorDescriptionLocalSessionStore(io.vertx.ext.web.sstore.LocalSessionStore delegate) Create a new instance ofLocalSessionStoredelegating to the given (non-null) instance ofLocalSessionStore.LocalSessionStore(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<Void>clear()Remove all sessions from the store.voidRemove all sessions from the store.Remove all sessions from the store.static LocalSessionStoreCreate a session storestatic LocalSessionStoreCreate a session storestatic LocalSessionStoreCreate a session storeio.smallrye.mutiny.Uni<Void>Delete the session with the specified ID.voiddeleteAndAwait(String arg0) Delete the session with the specified ID.deleteAndForget(String arg0) Delete the session with the specified ID.booleanio.smallrye.mutiny.Uni<Session>Get the session with the specified ID.getAndAwait(String arg0) Get the session with the specified ID.getAndForget(String arg0) Get the session with the specified ID.io.vertx.ext.web.sstore.LocalSessionStoreGet the delegate instance.inthashCode()static LocalSessionStorenewInstance(io.vertx.ext.web.sstore.LocalSessionStore delegate) Creates a new instance of theLocalSessionStore.io.smallrye.mutiny.Uni<Void>Add a session with the specified ID.voidputAndAwait(Session arg0) Add a session with the specified ID.putAndForget(Session arg0) Add a session with the specified ID.io.smallrye.mutiny.Uni<Integer>size()Get the number of sessions in the store.Get the number of sessions in the store.Get the number of sessions in the store.toString()Methods inherited from class io.vertx.mutiny.ext.web.sstore.SessionStore
close, create, createSession, createSession, init, newInstance, retryTimeout
-
Field Details
-
DEFAULT_REAPER_INTERVAL
public static final long DEFAULT_REAPER_INTERVALDefault of how often, in ms, to check for expired sessions- See Also:
-
DEFAULT_SESSION_MAP_NAME
Default name for map used to store sessions- See Also:
-
__TYPE_ARG
-
-
Constructor Details
-
LocalSessionStore
public LocalSessionStore(io.vertx.ext.web.sstore.LocalSessionStore delegate) Create a new instance ofLocalSessionStoredelegating to the given (non-null) instance ofLocalSessionStore. -
LocalSessionStore
-
-
Method Details
-
getDelegate
public io.vertx.ext.web.sstore.LocalSessionStore getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Overrides:
getDelegatein classSessionStore- Returns:
- the delegate instance
-
get
Get the session with the specified ID.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Overrides:
getin classSessionStore- Parameters:
cookieValue- the unique ID of the session- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
SessionStore.get(String)
-
getAndAwait
Get the session with the specified ID.Unlike the bare Vert.x variant, this method returns a
Session. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Overrides:
getAndAwaitin classSessionStore- Parameters:
cookieValue- the unique ID of the session- Returns:
- The operation result
- See Also:
-
SessionStore.get(String)
-
getAndForget
Get the session with the specified ID.Unlike the bare Vert.x variant, this method ignores the
Sessionresult or any failure.- Overrides:
getAndForgetin classSessionStore- Parameters:
cookieValue- the unique ID of the session- Returns:
- The current instance to chain operations if needed.
- See Also:
-
SessionStore.get(String)
-
put
Add a session with the specified ID.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Overrides:
putin classSessionStore- Parameters:
session- the session- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
io.vertx.ext.web.sstore.LocalSessionStore#put(Session)
-
putAndAwait
Add a session with the specified ID.Unlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Overrides:
putAndAwaitin classSessionStore- Parameters:
session- the session- See Also:
-
io.vertx.ext.web.sstore.LocalSessionStore#put(Session)
-
putAndForget
Add a session with the specified ID.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Overrides:
putAndForgetin classSessionStore- Parameters:
session- the session- Returns:
- The current instance to chain operations if needed.
- See Also:
-
io.vertx.ext.web.sstore.LocalSessionStore#put(Session)
-
size
Get the number of sessions in the store.Beware of the result which is just an estimate, in particular with distributed session stores.
Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Overrides:
sizein classSessionStore- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
SessionStore.size()
-
sizeAndAwait
Get the number of sessions in the store.Beware of the result which is just an estimate, in particular with distributed session stores.
Unlike the bare Vert.x variant, this method returns a
Integer. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Overrides:
sizeAndAwaitin classSessionStore- Returns:
- The operation result
- See Also:
-
SessionStore.size()
-
sizeAndForget
Get the number of sessions in the store.Beware of the result which is just an estimate, in particular with distributed session stores.
Unlike the bare Vert.x variant, this method ignores the
Integerresult or any failure.- Overrides:
sizeAndForgetin classSessionStore- Returns:
- The current instance to chain operations if needed.
- See Also:
-
SessionStore.size()
-
delete
Delete the session with the specified ID.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Overrides:
deletein classSessionStore- Parameters:
id- the session id- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
SessionStore.delete(String)
-
deleteAndAwait
Delete the session with the specified ID.Unlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Overrides:
deleteAndAwaitin classSessionStore- Parameters:
id- the session id- See Also:
-
SessionStore.delete(String)
-
deleteAndForget
Delete the session with the specified ID.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Overrides:
deleteAndForgetin classSessionStore- Parameters:
id- the session id- Returns:
- The current instance to chain operations if needed.
- See Also:
-
SessionStore.delete(String)
-
clear
Remove all sessions from the store.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Overrides:
clearin classSessionStore- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
SessionStore.clear()
-
clearAndAwait
public void clearAndAwait()Remove all sessions from the store.Unlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Overrides:
clearAndAwaitin classSessionStore- See Also:
-
SessionStore.clear()
-
clearAndForget
Remove all sessions from the store.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Overrides:
clearAndForgetin classSessionStore- Returns:
- The current instance to chain operations if needed.
- See Also:
-
SessionStore.clear()
-
create
Create a session store- Parameters:
vertx- the Vert.x instance- Returns:
- the session store
-
create
Create a session store- Parameters:
vertx- the Vert.x instancesessionMapName- name for map used to store sessions- Returns:
- the session store
-
create
Create a session store- Parameters:
vertx- the Vert.x instancesessionMapName- name for map used to store sessionsreaperInterval- how often, in ms, to check for expired sessions- Returns:
- the session store
-
newInstance
Creates a new instance of theLocalSessionStore. -
hashCode
public int hashCode()- Overrides:
hashCodein classSessionStore
-
equals
- Overrides:
equalsin classSessionStore
-
toString
- Overrides:
toStringin classSessionStore
-