AP&C API Reference
Public Member Functions | Protected Member Functions | Properties | Events | List of all members
Apac.Licensing.LockRecords Class Reference

An abstraction to provide features for tracking and searching lock records. More...

Inheritance diagram for Apac.Licensing.LockRecords:

Public Member Functions

 LockRecords (double persistenceTimerInterval, int volatileLockTimeoutInterval)
 Initializes a new instance of the LockRecords class. More...
 
void Add (AcquisitionResponse response)
 Adds a lock record for the specified response. More...
 
bool RemoveFeatureLock (string featureResponseId)
 Removes the lock record(s) with the specified feature response id. More...
 
bool RenewLocks (string acquisitionId, int keyLockTimeout)
 Renews the locks associated with the acquisition id. More...
 
bool RenewLock (string featureResponseId, int keyLockTimeout)
 Renews the lock. More...
 
bool Remove (string acquisitionId)
 Removes the lock record(s) with the specified acquisition id. More...
 
AuditResult Audit (AcquisitionRequest request)
 Checks the records for the given feature to be sure it holds the proper number of leases for a non-volatile lock. More...
 
AuditResult Audit (string contextId, string[] nodeIds, LicensedFeatures feature, int numLeasesHeld)
 Checks the record for the given feature to be sure it holds the proper number of leases for a non-volatile lock. More...
 
bool Remove (string contextId, string[] nodeIds, LicensedFeatures feature, int count, out string featureResponseId)
 Removes the volatile lock record with the specified context id, node id, feature and count. More...
 
bool Remove (string contextId, string[] nodeIds, LicensedFeatures feature, int numToRelease, int numLeasesHeld, out string featureResponseId)
 Removes the non-volatile lock record with the specified context id, node id, feature and count. More...
 
int GetLockCount (string contextId, string[] nodeIds, LicensedFeatures feature)
 Finds the existing lock count for feature in the given contextId and nodeId scope. More...
 
LockRecord Get (string contextId, string[] nodeIds, LicensedFeatures feature)
 
LockRecord[] ToArray ()
 
System.Xml.Schema.XmlSchema GetSchema ()
 
void ReadXml (System.Xml.XmlReader reader)
 
void WriteXml (System.Xml.XmlWriter writer)
 
void SetTimingParameters (double persistenceTimerInterval, int volatileLockTimeoutInterval)
 
void CheckTimeouts ()
 
IEnumerator< LockRecordGetEnumerator ()
 

Protected Member Functions

virtual void OnLocksPersistenceRequired ()
 

Properties

int Count [get]
 Gets the count. More...
 
bool IsDirty [get]
 Gets a value indicating whether this instance is dirty. More...
 

Events

LocksPersistenceRequiredHandler LocksPersistenceRequired
 

Detailed Description

An abstraction to provide features for tracking and searching lock records.

Constructor & Destructor Documentation

◆ LockRecords()

Apac.Licensing.LockRecords.LockRecords ( double  persistenceTimerInterval,
int  volatileLockTimeoutInterval 
)
inline

Initializes a new instance of the LockRecords class.

Parameters
persistenceTimerIntervalThe persistence timer interval in seconds.
volatileLockTimeoutIntervalThe volatile lock timeout interval in minutes.

Member Function Documentation

◆ Add()

void Apac.Licensing.LockRecords.Add ( AcquisitionResponse  response)
inline

Adds a lock record for the specified response.

Parameters
responseThe response.
featureResponseThe feature response.

◆ Audit() [1/2]

AuditResult Apac.Licensing.LockRecords.Audit ( AcquisitionRequest  request)
inline

Checks the records for the given feature to be sure it holds the proper number of leases for a non-volatile lock.

Parameters
acquisitionIdThe context id.
numLeasesHeldThe number of leases the client holds.

◆ Audit() [2/2]

AuditResult Apac.Licensing.LockRecords.Audit ( string  contextId,
string[]  nodeIds,
LicensedFeatures  feature,
int  numLeasesHeld 
)
inline

Checks the record for the given feature to be sure it holds the proper number of leases for a non-volatile lock.

Parameters
contextIdThe context id.
nodeIdsThe node ids.
featureThe feature.
numLeasesHeldThe number of leases the client holds.

◆ GetLockCount()

int Apac.Licensing.LockRecords.GetLockCount ( string  contextId,
string[]  nodeIds,
LicensedFeatures  feature 
)
inline

Finds the existing lock count for feature in the given contextId and nodeId scope.

Parameters
contextIdThe context identifier.
nodeIdsThe node identifiers.
featureThe feature.
Returns
Returns the count, or -1 if the given feature record cannot be found.

◆ Remove() [1/3]

bool Apac.Licensing.LockRecords.Remove ( string  acquisitionId)
inline

Removes the lock record(s) with the specified acquisition id.

Parameters
acquisitionIdThe acquisition id.
Returns
Returns true if a removal takes place, false if one does not.

◆ Remove() [2/3]

bool Apac.Licensing.LockRecords.Remove ( string  contextId,
string[]  nodeIds,
LicensedFeatures  feature,
int  count,
out string  featureResponseId 
)
inline

Removes the volatile lock record with the specified context id, node id, feature and count.

Parameters
contextIdThe context id.
nodeIdsThe node ids.
featureThe feature.
countThe count.
acquisitionIdThe acquisition id of the original request.
Returns
Returns true if a removal takes place, false if one does not.

◆ Remove() [3/3]

bool Apac.Licensing.LockRecords.Remove ( string  contextId,
string[]  nodeIds,
LicensedFeatures  feature,
int  numToRelease,
int  numLeasesHeld,
out string  featureResponseId 
)
inline

Removes the non-volatile lock record with the specified context id, node id, feature and count.

Parameters
contextIdThe context id.
nodeIdsThe node ids.
featureThe feature.
numToReleaseThe count.
numLeasesHeldThe number of leases held by the client.
featureResponseIdThe id of the feature response to the original request.
Returns
Returns true if a removal takes place, false if one does not.

◆ RemoveFeatureLock()

bool Apac.Licensing.LockRecords.RemoveFeatureLock ( string  featureResponseId)
inline

Removes the lock record(s) with the specified feature response id.

Parameters
acquisitionIdThe feature response id.
Returns
Returns true if a removal takes place, false if one does not.

◆ RenewLock()

bool Apac.Licensing.LockRecords.RenewLock ( string  featureResponseId,
int  keyLockTimeout 
)
inline

Renews the lock.

Parameters
featureResponseIdThe feature response id.
keyLockTimeoutThe key lock timeout.
Returns

◆ RenewLocks()

bool Apac.Licensing.LockRecords.RenewLocks ( string  acquisitionId,
int  keyLockTimeout 
)
inline

Renews the locks associated with the acquisition id.

Parameters
acquisitionIdThe acquisition id.
keyLockTimeoutThe key lock timeout.
Returns

Property Documentation

◆ Count

int Apac.Licensing.LockRecords.Count
get

Gets the count.

The count.

◆ IsDirty

bool Apac.Licensing.LockRecords.IsDirty
get

Gets a value indicating whether this instance is dirty.

true if this instance is dirty; otherwise, false.


The documentation for this class was generated from the following file: