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

The data type used to track successful leases. More...

Inheritance diagram for Apac.Licensing.LockRecord:

Public Member Functions

 LockRecord (AcquisitionResponse response, FeatureResponse featureResponse, int timeout)
 Initializes a new instance of the LeaseRecord class. More...
 
void Increment (int count)
 Increments the lease count for the feature in this record. More...
 
void Decrement (int count)
 Decrements the lease count for the feature in this record. More...
 
void Renew (int timeout)
 
bool ContainsNodeId (string[] nodeIds)
 Determines if the node ids in the lock record contain one of the given node ids. More...
 
System.Xml.Schema.XmlSchema GetSchema ()
 
void ReadXml (System.Xml.XmlReader reader)
 
void WriteXml (System.Xml.XmlWriter writer)
 

Static Public Member Functions

static string DefineKey (string contextId, string[] nodeIds, LicensedFeatures feature)
 Builds the key used to store the LockRecord in the dictionary. More...
 
static string GetNodeIdsString (string[] nodeIds)
 

Protected Member Functions

 LockRecord ()
 For serialization. More...
 
virtual void OnLockTimedOut ()
 
virtual void OnLockRenewed ()
 

Properties

string Key [get, protected set]
 Gets the key. More...
 
string AcquisitionId [get, protected set]
 Gets the id of the acquisition request. More...
 
string ContextId [get, protected set]
 Gets the context id. More...
 
string[] NodeIds [get, protected set]
 Gets the node ids. More...
 
LicensedFeatures Feature [get, protected set]
 Gets the feature. More...
 
int Count [get, protected set]
 Gets the count. More...
 
string FeatureResponseId [get, protected set]
 Gets the feature response id. More...
 
FeatureType FeatureType [get]
 Gets the type of the feature. More...
 
int Duration [get]
 Gets the duration. More...
 
bool IsExpired [get]
 Gets a value indicating whether this instance is expired. More...
 

Events

LockTimedOutHandler LockTimedOut
 
LockRenewedHandler LockRenewed
 

Detailed Description

The data type used to track successful leases.

Constructor & Destructor Documentation

◆ LockRecord() [1/2]

Apac.Licensing.LockRecord.LockRecord ( )
inlineprotected

For serialization.

◆ LockRecord() [2/2]

Apac.Licensing.LockRecord.LockRecord ( AcquisitionResponse  response,
FeatureResponse  featureResponse,
int  timeout 
)
inline

Initializes a new instance of the LeaseRecord class.

Parameters
responseThe response.
featureThe feature.
timeoutThe duration of the lock in minutes.

Member Function Documentation

◆ ContainsNodeId()

bool Apac.Licensing.LockRecord.ContainsNodeId ( string[]  nodeIds)
inline

Determines if the node ids in the lock record contain one of the given node ids.

Parameters
nodeIdThe node ids to match.
Returns
Returns true if a match is found, otherwise false.

◆ Decrement()

void Apac.Licensing.LockRecord.Decrement ( int  count)
inline

Decrements the lease count for the feature in this record.

Parameters
countThe count.

◆ DefineKey()

static string Apac.Licensing.LockRecord.DefineKey ( string  contextId,
string[]  nodeIds,
LicensedFeatures  feature 
)
inlinestatic

Builds the key used to store the LockRecord in the dictionary.

Parameters
contextIdThe context id.
nodeIdsThe node ids.
featureThe feature.
Returns

◆ Increment()

void Apac.Licensing.LockRecord.Increment ( int  count)
inline

Increments the lease count for the feature in this record.

Parameters
countThe count.

Property Documentation

◆ AcquisitionId

string Apac.Licensing.LockRecord.AcquisitionId
getprotected set

Gets the id of the acquisition request.

The id.

◆ ContextId

string Apac.Licensing.LockRecord.ContextId
getprotected set

Gets the context id.

The context id.

◆ Count

int Apac.Licensing.LockRecord.Count
getprotected set

Gets the count.

The count.

◆ Duration

int Apac.Licensing.LockRecord.Duration
get

Gets the duration.

The duration.

◆ Feature

LicensedFeatures Apac.Licensing.LockRecord.Feature
getprotected set

Gets the feature.

The feature.

◆ FeatureResponseId

string Apac.Licensing.LockRecord.FeatureResponseId
getprotected set

Gets the feature response id.

The node id.

◆ FeatureType

FeatureType Apac.Licensing.LockRecord.FeatureType
get

Gets the type of the feature.

The type of the feature.

◆ IsExpired

bool Apac.Licensing.LockRecord.IsExpired
get

Gets a value indicating whether this instance is expired.

true if this instance is expired; otherwise, false.

◆ Key

string Apac.Licensing.LockRecord.Key
getprotected set

Gets the key.

The key.

◆ NodeIds

string [] Apac.Licensing.LockRecord.NodeIds
getprotected set

Gets the node ids.

The node ids.


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