io.vertx.ext.web.sstore

## Interface SessionStore

- All Known Subinterfaces:
    ClusteredSessionStore, LocalSessionStore

      public interface SessionStore

  A session store is used to store sessions for an Vert.x-Web web app
  Author:
    Tim Fox

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    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
    `void` | `size(Handler<AsyncResult<Integer>> resultHandler)` Get the number of sessions in the store

- - ### Method Detail

    - #### createSession

          Session createSession(long timeout)

      Create a new session
      Parameters:
        `timeout` - - the session timeout, in ms
      Returns:
        the session

    - #### get

          void get(String id,
                   Handler<AsyncResult<Session>> resultHandler)

      Get the session with the specified ID
      Parameters:
        `id` - the unique ID of the session
        `resultHandler` - will be called with a result holding the session, or a failure

    - #### delete

          void delete(String id,
                      Handler<AsyncResult<Boolean>> resultHandler)

      Delete the session with the specified ID
      Parameters:
        `id` - the unique ID of the session
        `resultHandler` - will be called with a result true/false, or a failure

    - #### put

          void put(Session session,
                   Handler<AsyncResult<Boolean>> resultHandler)

      Add a session with the specified ID
      Parameters:
        `session` - the session
        `resultHandler` - will be called with a result true/false, or a failure

    - #### clear

          void clear(Handler<AsyncResult<Boolean>> resultHandler)

      Remove all sessions from the store
      Parameters:
        `resultHandler` - will be called with a result true/false, or a failure

    - #### size

          void size(Handler<AsyncResult<Integer>> resultHandler)

      Get the number of sessions in the store
      Parameters:
        `resultHandler` - will be called with the number, or a failure

    - #### close

          void close()

      Close the store

Copyright © 2015. All rights reserved.