Create a new SessionLockImpl instance
the session lock acquisition
the setter that will be initialised to allow
access to the owned
property
a callback that will unlock the session lock
The session lock acquisition
Flag indicating if the session lock is owned
The service to request release of the lock
Get the name of the lock
the name of the session lock
The scope of the lock.
The scope determines when the lock will be released automatically.
If a session makes multiple
requests for a lock
using different scopes, and the server assigns the lock to the session
fulfilling the requests, the lock will be given the weakest scope
(UNLOCK_ON_CONNECTION_LOSS
). Consequently, an individual request can
complete with a lock that has a different scope to that requested.
the lock scope
A value that identifies the acquisition of the lock with the given name. SessionLocks that are acquired later are guaranteed to have bigger sequence values, allowing the sequence number to be used as a fencing token.
a value that identifies the acquisition of this lock
Test whether the session lock is still owned.
true
if the session lock is still owned by the session
Convert the SessionLockImpl to a string
the string representation of the session lock
Release a session lock, if owned.
a Promise that resolves when a response is received from the server.
On completion, this session will no longer own the named session lock. If Promise completes normally, a true value indicates this session previously owned the lock and a false value indicates it did not.
If the Promise resolves with an error, this session does not own the session lock.
Implementation of the SessionLock interface