Class ClusteredSessionStore

java.lang.Object
io.vertx.mutiny.ext.web.sstore.SessionStore
io.vertx.mutiny.ext.web.sstore.ClusteredSessionStore
All Implemented Interfaces:
MutinyDelegate

public class ClusteredSessionStore extends SessionStore implements MutinyDelegate
A session store which stores sessions in a distributed map so they are available across the cluster.

NOTE: This class has been automatically generated from the original non Mutiny-ified interface.

Author:
Tim Fox, Paulo Lopes
See Also:
  • ClusteredSessionStore
  • Field Details

  • Constructor Details

    • ClusteredSessionStore

      public ClusteredSessionStore(io.vertx.ext.web.sstore.ClusteredSessionStore delegate)
      Create a new instance of ClusteredSessionStore delegating to the given (non-null) instance of ClusteredSessionStore.
    • ClusteredSessionStore

      public ClusteredSessionStore(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.ext.web.sstore.ClusteredSessionStore 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:
      getDelegate in interface MutinyDelegate
      Overrides:
      getDelegate in class SessionStore
      Returns:
      the delegate instance
    • size

      @CheckReturnValue public io.smallrye.mutiny.Uni<Integer> 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:
      size in class SessionStore
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • SessionStore.size()
    • sizeAndAwait

      public Integer 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 a RuntimeException).

      Overrides:
      sizeAndAwait in class SessionStore
      Returns:
      The operation result
      See Also:
      • SessionStore.size()
    • sizeAndForget

      public ClusteredSessionStore 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 Integer result or any failure.

      Overrides:
      sizeAndForget in class SessionStore
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • SessionStore.size()
    • delete

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> delete(String arg0)
      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:
      delete in class SessionStore
      Parameters:
      id - the session id
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • SessionStore.delete(String)
    • deleteAndAwait

      public void deleteAndAwait(String arg0)
      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 a RuntimeException).

      Overrides:
      deleteAndAwait in class SessionStore
      Parameters:
      id - the session id
      See Also:
      • SessionStore.delete(String)
    • deleteAndForget

      public ClusteredSessionStore deleteAndForget(String arg0)
      Delete the session with the specified ID.

      Unlike the bare Vert.x variant, this method ignores the Void result or any failure.

      Overrides:
      deleteAndForget in class SessionStore
      Parameters:
      id - the session id
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • SessionStore.delete(String)
    • clear

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> 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:
      clear in class SessionStore
      Returns:
      A Uni representing 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 a RuntimeException).

      Overrides:
      clearAndAwait in class SessionStore
      See Also:
      • SessionStore.clear()
    • clearAndForget

      public ClusteredSessionStore clearAndForget()
      Remove all sessions from the store.

      Unlike the bare Vert.x variant, this method ignores the Void result or any failure.

      Overrides:
      clearAndForget in class SessionStore
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • SessionStore.clear()
    • put

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> put(Session arg0)
      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:
      put in class SessionStore
      Parameters:
      session - the session
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • io.vertx.ext.web.sstore.ClusteredSessionStore#put(Session)
    • putAndAwait

      public void putAndAwait(Session arg0)
      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 a RuntimeException).

      Overrides:
      putAndAwait in class SessionStore
      Parameters:
      session - the session
      See Also:
      • io.vertx.ext.web.sstore.ClusteredSessionStore#put(Session)
    • putAndForget

      public ClusteredSessionStore putAndForget(Session arg0)
      Add a session with the specified ID.

      Unlike the bare Vert.x variant, this method ignores the Void result or any failure.

      Overrides:
      putAndForget in class SessionStore
      Parameters:
      session - the session
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • io.vertx.ext.web.sstore.ClusteredSessionStore#put(Session)
    • get

      @CheckReturnValue public io.smallrye.mutiny.Uni<Session> get(String arg0)
      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:
      get in class SessionStore
      Parameters:
      cookieValue - the unique ID of the session
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • SessionStore.get(String)
    • getAndAwait

      public Session getAndAwait(String arg0)
      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 a RuntimeException).

      Overrides:
      getAndAwait in class SessionStore
      Parameters:
      cookieValue - the unique ID of the session
      Returns:
      The operation result
      See Also:
      • SessionStore.get(String)
    • getAndForget

      public ClusteredSessionStore getAndForget(String arg0)
      Get the session with the specified ID.

      Unlike the bare Vert.x variant, this method ignores the Session result or any failure.

      Overrides:
      getAndForget in class SessionStore
      Parameters:
      cookieValue - the unique ID of the session
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • SessionStore.get(String)
    • create

      public static ClusteredSessionStore create(Vertx vertx, String sessionMapName)
      Create a session store
      Parameters:
      vertx - the Vert.x instance
      sessionMapName - the session map name
      Returns:
      the session store
    • create

      public static ClusteredSessionStore create(Vertx vertx, String sessionMapName, long retryTimeout)
      Create a session store.

      The retry timeout value, configures how long the session handler will retry to get a session from the store when it is not found.

      Parameters:
      vertx - the Vert.x instance
      sessionMapName - the session map name
      retryTimeout - the store retry timeout, in ms
      Returns:
      the session store
    • create

      public static ClusteredSessionStore create(Vertx vertx)
      Create a session store
      Parameters:
      vertx - the Vert.x instance
      Returns:
      the session store
    • create

      public static ClusteredSessionStore create(Vertx vertx, long retryTimeout)
      Create a session store.

      The retry timeout value, configures how long the session handler will retry to get a session from the store when it is not found.

      Parameters:
      vertx - the Vert.x instance
      retryTimeout - the store retry timeout, in ms
      Returns:
      the session store
    • newInstance

      public static ClusteredSessionStore newInstance(io.vertx.ext.web.sstore.ClusteredSessionStore delegate)
      Creates a new instance of the ClusteredSessionStore.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class SessionStore
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class SessionStore
    • toString

      public String toString()
      Overrides:
      toString in class SessionStore