Namespace: Consultingwerk.SmartFramework.Lock
Class 
SmartLockService Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object
Implements: Consultingwerk.SmartFramework.Lock.ISmartLockService

File:SmartLockService
Author(s):Richard Kelters / Consultingwerk Ltd.
Created:Mon Feb 12 17:06:28 CET 2018



Top Method Summary
Options Name Purpose
# LOGICAL AcquireLock (character, character, character, integer, logical) Aquire logical application lock for a record or a resource
+ LOGICAL AcquireLock (character, character, integer, logical) Aquire logical application lock for a record
+ LOGICAL AcquireLock (character, integer, logical) Aquire logical application lock for a resource
+ ReleaseAllExpiredLocks () Delete all expired SmartLock records
+ ReleaseAllSessionLocks (character) Delete all SmartLock record of a session
+ LOGICAL ReleaseLock (character) Release a logical application lock for a resource
+ LOGICAL ReleaseLock (character, character) Release a logical application lock for a record
# LOGICAL ReleaseLock (character, character, character) Release a logical application lock for a record or a resource


Method Detail
Top

PROTECTED LOGICAL AcquireLock (character, character, character, integer, logical)

Purpose: Aquire logical application lock for a record or a resource
Notes: Tries to create or update a SmartLock record

Parameters:
pcTableGuid CHARACTER
Reference to unique record in SmartTable
pcKeyValues CHARACTER
Values of a unique key field(s)
pcResourceIdentifier CHARACTER
Resource only known to the one using it
piLockDuration INTEGER
How long the lock may be hold in seconds
plThrowOnAlreadyLocked LOGICAL
Logical indication to throw a record ... or not
Returns LOGICAL
True if lock is given else false.
Top

PUBLIC LOGICAL AcquireLock (character, character, integer, logical)

Purpose: Aquire logical application lock for a record
Notes:

Parameters:
pcTableGuid CHARACTER
Reference to unique record in SmartTable
pcKeyValues CHARACTER
Values of a unique key field(s)
piLockDuration INTEGER
How long the lock may be hold in seconds
plThrowOnAlreadyLocked LOGICAL
Logical indication to throw a record ... or not
Returns LOGICAL
True if lock is given else false
Top

PUBLIC LOGICAL AcquireLock (character, integer, logical)

Purpose: Aquire logical application lock for a resource
Notes:

Parameters:
pcResourceIdentifier CHARACTER
Resource only known to the one using it
piLockDuration INTEGER
How long the lock may be hold in seconds
plThrowOnAlreadyLocked LOGICAL
Logical indication to throw a record ... or not
Returns LOGICAL
True if lock is given else false
Top

PUBLIC ReleaseAllExpiredLocks ()

Purpose: Delete all expired SmartLock records
Notes: Typically called from a (Smart)Batch

Top

PUBLIC ReleaseAllSessionLocks (character)

Purpose: Delete all SmartLock record of a session
Notes: Typically called from the as_disconnect procedure

Parameters:
pcSessionId CHARACTER
SessionId as provided by the SessionManager
Top

PUBLIC LOGICAL ReleaseLock (character)

Purpose: Release a logical application lock for a resource
Notes:

Parameters:
pcResourceIdentifier CHARACTER
Resource only known to the one using it
Returns LOGICAL
True if lock is found and released else false.
Top

PUBLIC LOGICAL ReleaseLock (character, character)

Purpose: Release a logical application lock for a record
Notes:

Parameters:
pcTableGuid CHARACTER
Reference to unique record in SmartTable
pcKeyValues CHARACTER
Values of a unique key field(s)
Returns LOGICAL
True if lock is found and released else false
Top

PROTECTED LOGICAL ReleaseLock (character, character, character)

Purpose: Release a logical application lock for a record or a resource
Notes: Tries to delete a SmartLock record

Parameters:
pcTableGuid CHARACTER
Reference to unique record in SmartTable
pcKeyValues CHARACTER
Values of a unique key field(s)
pcResourceIdentifier CHARACTER
Resource only known to the one using it
Returns LOGICAL
True if lock is found and released else false


©2006-2020 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       04.02.2020 23:21:18