Class List Method List File List

# Class: VertxWeb::LocalSessionStore

Inherits:
  SessionStore
  - Object
  - SessionStore
  - VertxWeb::LocalSessionStore
  show all
Defined in:
  /Users/julien/java/vertx-aggregator/modules/vertx-web/vertx-web/src/main/resources/vertx-web/local_session_store.rb

## Overview

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

Can be used when sticky sessions are being used.

## Class Method Summary (collapse)

- + (::VertxWeb::LocalSessionStore) create(vertx = nil, sessionMapName = nil, reaperInterval = nil)
  Create a session store.

### Methods inherited from SessionStore

#clear, #close, #create_session, #delete, #get, #put, #size

## Class Method Details

### + (`::VertxWeb::LocalSessionStore`) create(vertx = nil, sessionMapName = nil, reaperInterval = nil)

Create a session store

Parameters:

- vertx (`::Vertx::Vertx`) (defaults to: `nil`) —
  the Vert.x instance
- sessionMapName (`String`) (defaults to: `nil`) —
  name for map used to store sessions
- reaperInterval (`Fixnum`) (defaults to: `nil`) —
  how often, in ms, to check for expired sessions

Returns:

- (`::VertxWeb::LocalSessionStore`) —
  the session store

Raises:

- (`ArgumentError`)

    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-web/vertx-web/src/main/resources/vertx-web/local_session_store.rb', line 26

    def self.create(vertx=nil,sessionMapName=nil,reaperInterval=nil)
      if vertx.class.method_defined?(:j_del) && !block_given? && sessionMapName == nil && reaperInterval == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebSstore::LocalSessionStore.java_method(:create, [Java::IoVertxCore::Vertx.java_class]).call(vertx.j_del),::VertxWeb::LocalSessionStore)
      elsif vertx.class.method_defined?(:j_del) && sessionMapName.class == String && !block_given? && reaperInterval == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebSstore::LocalSessionStore.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,sessionMapName),::VertxWeb::LocalSessionStore)
      elsif vertx.class.method_defined?(:j_del) && sessionMapName.class == String && reaperInterval.class == Fixnum && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebSstore::LocalSessionStore.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::long.java_class]).call(vertx.j_del,sessionMapName,reaperInterval),::VertxWeb::LocalSessionStore)
      end
      raise ArgumentError, "Invalid arguments when calling create(vertx,sessionMapName,reaperInterval)"
    end