# Class: SessionStore

## vertx-web-js/session_store~ SessionStore

#### new SessionStore()

  A session store is used to store sessions for an Vert.x-Web web app
  Source:
    - session_store.js, line 30

### Methods

#### clear(resultHandler)

  Remove all sessions from the store

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `resultHandler` | function | will be called with a result true/false, or a failure

  Source:
    - session_store.js, line 115

#### close()

  Close the store
  Source:
    - session_store.js, line 153

#### createSession(timeout) → {Session}

  Create a new session

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `timeout` | number | the session timeout, in ms

  Source:
    - session_store.js, line 42

  ##### Returns:

  the session
  Type
    Session

#### delete(id, resultHandler)

  Delete the session with the specified ID

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `id` | string | the unique ID of the session
  `resultHandler` | function | will be called with a result true/false, or a failure

  Source:
    - session_store.js, line 76

#### get(id, resultHandler)

  Get the session with the specified ID

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `id` | string | the unique ID of the session
  `resultHandler` | function | will be called with a result holding the session, or a failure

  Source:
    - session_store.js, line 56

#### put(session, resultHandler)

  Add a session with the specified ID

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `session` | Session | the session
  `resultHandler` | function | will be called with a result true/false, or a failure

  Source:
    - session_store.js, line 96

#### size(resultHandler)

  Get the number of sessions in the store

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `resultHandler` | function | will be called with the number, or a failure

  Source:
    - session_store.js, line 134