Class: AWS::SessionStore::DynamoDB::Locking::Pessimistic
- Defined in:
- lib/aws/session_store/dynamo_db/locking/pessimistic.rb
Overview
This class implements a pessimistic locking strategy for the DynamoDB session handler. Sessions obtain an exclusive lock for reads that is only released when the session is saved.
Constant Summary collapse
- WAIT_ERROR =
def set_session_data(env, sid, session, = {}) super(env, sid, session, (env, )) end
Instance Method Summary collapse
-
#get_session_data(env, sid) ⇒ Object
Gets session from database and places a lock on the session while you are reading from the database.
Methods inherited from Base
#delete_session, #handle_error, #initialize, #pack_data, #set_session_data
Constructor Details
This class inherits a constructor from AWS::SessionStore::DynamoDB::Locking::Base
Instance Method Details
#get_session_data(env, sid) ⇒ Object
Gets session from database and places a lock on the session while you are reading from the database.
29 30 31 32 33 |
# File 'lib/aws/session_store/dynamo_db/locking/pessimistic.rb', line 29 def get_session_data(env, sid) handle_error(env) do get_session_with_lock(env, sid) end end |