# Class: LocalSessionStore

## vertx-web-js/local_session_store~ LocalSessionStore

#### new LocalSessionStore()

A session store which is only available on a single node.

Can be used when sticky sessions are being used.

Source:
  - vertx-web-js/local_session_store.js, line 34

### 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:
  - vertx-web-js/local_session_store.js, line 136

#### close()

Close the store

Source:
  - vertx-web-js/local_session_store.js, line 174

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

Create a new session

##### Parameters:

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

Source:
  - vertx-web-js/local_session_store.js, line 63

##### 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:
  - vertx-web-js/local_session_store.js, line 97

#### 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:
  - vertx-web-js/local_session_store.js, line 77

#### 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:
  - vertx-web-js/local_session_store.js, line 117

#### retryTimeout() → {number}

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.

Source:
  - vertx-web-js/local_session_store.js, line 49

##### Returns:

the timeout value, in ms

Type
  number

#### 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:
  - vertx-web-js/local_session_store.js, line 155