Class: Aws::SessionStore::DynamoDB::Locking::Null Private
- Defined in:
- lib/aws/session_store/dynamo_db/locking/null.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
This class gets and sets sessions without a locking strategy.
Instance Method Summary collapse
-
#extract_data(env, result = nil) ⇒ String
private
Session data.
-
#get_session_data(env, sid) ⇒ Object
private
Retrieve session if it exists from the database by id.
-
#get_session_opts(sid) ⇒ Hash
private
Options for getting session.
Methods inherited from Base
#delete_session, #initialize, #set_session_data
Constructor Details
This class inherits a constructor from Aws::SessionStore::DynamoDB::Locking::Base
Instance Method Details
#extract_data(env, result = nil) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns Session data.
22 23 24 25 |
# File 'lib/aws/session_store/dynamo_db/locking/null.rb', line 22 def extract_data(env, result = nil) env['rack.initial_data'] = result[:item]['data'] if result[:item] unpack_data(result[:item]['data']) if result[:item] end |
#get_session_data(env, sid) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Retrieve session if it exists from the database by id. Unpack the data once retrieved from the database.
9 10 11 12 13 14 |
# File 'lib/aws/session_store/dynamo_db/locking/null.rb', line 9 def get_session_data(env, sid) handle_error(env) do result = @config.dynamo_db_client.get_item(get_session_opts(sid)) extract_data(env, result) end end |
#get_session_opts(sid) ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns Options for getting session.
17 18 19 |
# File 'lib/aws/session_store/dynamo_db/locking/null.rb', line 17 def get_session_opts(sid) merge_all(table_opts(sid), attr_opts) end |