MAK Legion API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
Legion::OwnershipManager Class Reference
+ Collaboration diagram for Legion::OwnershipManager:

Classes

struct  AcquiredCallbackData
 
struct  CallbackData
 
struct  DivestitureRequestCallbackData
 
struct  InitiateAcquisitionRequestCallbackData
 
struct  InitiateAcquisitionResultCallbackData
 
struct  RequestRejectedCallbackData
 

Public Member Functions

virtual OwnershipManagerHandle handle () const
 
virtual void rejectDivestitureRequest (TransactionIdentifier transactionId, Span< GlobalIdentifier > globalIds, Span< char > privateData)
 Reject an ownership divestiture request for the given objects that where requested with the given transaction ID. More...
 
virtual void divest (TransactionIdentifier transactionId, Span< GlobalIdentifier > globalIds, Span< char > privateData)
 Divest ownership of the given objects previously requested with the given transaction ID. More...
 
virtual void initateAcquisitionRequestResponse (TransactionIdentifier transactionId, Span< GlobalIdentifier > globalIds, InitiateAcquisitionResult result, std::string exceptionDescription="")
 Provide results for the given objects to an initiated request. More...
 
virtual UInt64 requestAcquisition (Span< GlobalIdentifier > globalIds, Span< char > privateData, TransactionIdentifier transactionId=0)
 Request ownership acquisition for one or more objects (i.e., root parent attribute set) with the given global identifiers. More...
 
virtual UInt64 requestInitiateAcquisition (ClientIdentifier acquiringClientId, Span< GlobalIdentifier > globalIds, Span< char > privateData)
 Request another client initiate an ownership acquisition of the given attributes Return a transaction ID for the request (will be delivered in corresponding InitiateAcquisitionResult callback) More...
 
virtual UInt32 addDivestitureRequestCallback (DivestitureRequestCallback callback)
 Add/Remove callbacks to handle the ownership actions A handle is returned when adding a callback and it can be used to remove the callback. More...
 
virtual bool removeDivestitureRequestCallback (UInt32 callbackHandle)
 Add/Remove callbacks to handle the ownership actions A handle is returned when adding a callback and it can be used to remove the callback. More...
 
virtual UInt32 addRequestRejectedCallback (RequestRejectedCallback callback)
 Add/Remove callbacks to handle the ownership actions A handle is returned when adding a callback and it can be used to remove the callback. More...
 
virtual bool removeRequestRejectedCallback (UInt32 callbackHandle)
 Add/Remove callbacks to handle the ownership actions A handle is returned when adding a callback and it can be used to remove the callback. More...
 
virtual UInt32 addAcquiredCallback (AcquiredCallback callback)
 Add/Remove callbacks to handle the ownership actions A handle is returned when adding a callback and it can be used to remove the callback. More...
 
virtual bool removeAcquiredCallback (UInt32 callbackHandle)
 Add/Remove callbacks to handle the ownership actions A handle is returned when adding a callback and it can be used to remove the callback. More...
 
virtual UInt32 addInitiateAcquisitionRequestCallback (InitiateAcquisitionRequestCallback callback)
 Add/Remove callbacks to handle the ownership actions A handle is returned when adding a callback and it can be used to remove the callback. More...
 
virtual bool removeInitiateAcquisitionRequestCallback (UInt32 callbackHandle)
 Add/Remove callbacks to handle the ownership actions A handle is returned when adding a callback and it can be used to remove the callback. More...
 
virtual UInt32 addInitiateAcquisitionResultCallback (InitiateAcquisitionResultCallback callback)
 Add/Remove callbacks to handle the ownership actions A handle is returned when adding a callback and it can be used to remove the callback. More...
 
virtual bool removeInitiateAcquisitionResultCallback (UInt32 callbackHandle)
 Add/Remove callbacks to handle the ownership actions A handle is returned when adding a callback and it can be used to remove the callback. More...
 

Protected Member Functions

 OwnershipManager (OwnershipManagerHandle ownershipHandle, DatabaseHandle databaseHandle)
 Constructor. More...
 
virtual ~OwnershipManager ()
 Destructor. More...
 
virtual CallbackDataremoveCallback (std::vector< CallbackData * > &callbackList, UInt32 callbackHandle)
 

Static Protected Member Functions

static void divestitureRequestCallback (void *usr, divestitureRequestCallbackParameters)
 
static void requestRejectedCallback (void *usr, requestRejectedCallbackParameters)
 
static void acquiredCallback (void *usr, acquiredCallbackParameters)
 
static void initiateAcquisitionRequestCallback (void *usr, initiateAcquisitionRequestCallbackParameters)
 
static void initiateAcquisitionResultCallback (void *usr, initiateAcquisitionResultCallbackParameters)
 

Protected Attributes

OwnershipManagerHandle myHandle
 
DatabaseHandle myDatabaseHandle
 
std::vector< CallbackData * > myDivestitureRequestCallbacks
 
std::vector< CallbackData * > myRequestRejectedCallbacks
 
std::vector< CallbackData * > myAcquiredCallbacks
 
std::vector< CallbackData * > myInitiateAcquisitionRequestCallbacks
 
std::vector< CallbackData * > myInitiateAcquisitionResultCallbacks
 

Friends

class Connection
 

Constructor & Destructor Documentation

Legion::OwnershipManager::OwnershipManager ( OwnershipManagerHandle  ownershipHandle,
DatabaseHandle  databaseHandle 
)
protected

Constructor.

virtual Legion::OwnershipManager::~OwnershipManager ( )
protectedvirtual

Destructor.

Member Function Documentation

static void Legion::OwnershipManager::acquiredCallback ( void *  usr,
acquiredCallbackParameters   
)
staticprotected
virtual UInt32 Legion::OwnershipManager::addAcquiredCallback ( AcquiredCallback  callback)
virtual

Add/Remove callbacks to handle the ownership actions A handle is returned when adding a callback and it can be used to remove the callback.

Referenced by main().

virtual UInt32 Legion::OwnershipManager::addDivestitureRequestCallback ( DivestitureRequestCallback  callback)
virtual

Add/Remove callbacks to handle the ownership actions A handle is returned when adding a callback and it can be used to remove the callback.

Referenced by main().

virtual UInt32 Legion::OwnershipManager::addInitiateAcquisitionRequestCallback ( InitiateAcquisitionRequestCallback  callback)
virtual

Add/Remove callbacks to handle the ownership actions A handle is returned when adding a callback and it can be used to remove the callback.

virtual UInt32 Legion::OwnershipManager::addInitiateAcquisitionResultCallback ( InitiateAcquisitionResultCallback  callback)
virtual

Add/Remove callbacks to handle the ownership actions A handle is returned when adding a callback and it can be used to remove the callback.

virtual UInt32 Legion::OwnershipManager::addRequestRejectedCallback ( RequestRejectedCallback  callback)
virtual

Add/Remove callbacks to handle the ownership actions A handle is returned when adding a callback and it can be used to remove the callback.

Referenced by main().

virtual void Legion::OwnershipManager::divest ( TransactionIdentifier  transactionId,
Span< GlobalIdentifier globalIds,
Span< char >  privateData 
)
virtual

Divest ownership of the given objects previously requested with the given transaction ID.

The given private data is provided to the requesting client upon ownership acquisition The objects are no longer owned by this client upon returning from this call. The object may or may not still be known as remote objects with appropriate add/move/remove callbacks on views.

Referenced by doDivest(), and processOwnershipDivestitureRequest().

static void Legion::OwnershipManager::divestitureRequestCallback ( void *  usr,
divestitureRequestCallbackParameters   
)
staticprotected
virtual OwnershipManagerHandle Legion::OwnershipManager::handle ( ) const
virtual
virtual void Legion::OwnershipManager::initateAcquisitionRequestResponse ( TransactionIdentifier  transactionId,
Span< GlobalIdentifier globalIds,
InitiateAcquisitionResult  result,
std::string  exceptionDescription = "" 
)
virtual

Provide results for the given objects to an initiated request.

Supply a description of exception if one occurs e.g. problems with private data or creating write repository, etc.

static void Legion::OwnershipManager::initiateAcquisitionRequestCallback ( void *  usr,
initiateAcquisitionRequestCallbackParameters   
)
staticprotected
static void Legion::OwnershipManager::initiateAcquisitionResultCallback ( void *  usr,
initiateAcquisitionResultCallbackParameters   
)
staticprotected
virtual void Legion::OwnershipManager::rejectDivestitureRequest ( TransactionIdentifier  transactionId,
Span< GlobalIdentifier globalIds,
Span< char >  privateData 
)
virtual

Reject an ownership divestiture request for the given objects that where requested with the given transaction ID.

Referenced by doReject(), and processOwnershipDivestitureRequest().

virtual bool Legion::OwnershipManager::removeAcquiredCallback ( UInt32  callbackHandle)
virtual

Add/Remove callbacks to handle the ownership actions A handle is returned when adding a callback and it can be used to remove the callback.

virtual CallbackData* Legion::OwnershipManager::removeCallback ( std::vector< CallbackData * > &  callbackList,
UInt32  callbackHandle 
)
protectedvirtual
virtual bool Legion::OwnershipManager::removeDivestitureRequestCallback ( UInt32  callbackHandle)
virtual

Add/Remove callbacks to handle the ownership actions A handle is returned when adding a callback and it can be used to remove the callback.

virtual bool Legion::OwnershipManager::removeInitiateAcquisitionRequestCallback ( UInt32  callbackHandle)
virtual

Add/Remove callbacks to handle the ownership actions A handle is returned when adding a callback and it can be used to remove the callback.

virtual bool Legion::OwnershipManager::removeInitiateAcquisitionResultCallback ( UInt32  callbackHandle)
virtual

Add/Remove callbacks to handle the ownership actions A handle is returned when adding a callback and it can be used to remove the callback.

virtual bool Legion::OwnershipManager::removeRequestRejectedCallback ( UInt32  callbackHandle)
virtual

Add/Remove callbacks to handle the ownership actions A handle is returned when adding a callback and it can be used to remove the callback.

virtual UInt64 Legion::OwnershipManager::requestAcquisition ( Span< GlobalIdentifier globalIds,
Span< char >  privateData,
TransactionIdentifier  transactionId = 0 
)
virtual

Request ownership acquisition for one or more objects (i.e., root parent attribute set) with the given global identifiers.

The actual request will include all extensions (and decedent attribute sets) for each object. A buffer of private data can be included and will be presented to owning client when request to divest object(s) is made. If the request has been initiated by another client, that transaction ID can be used for this transaction; otherwise, a new transaction ID will be generated and returned Return a transaction ID for the request (will be delivered in corresponding ownershipAcquired callback) Currently only supports the first object in the list

Referenced by requestOwnership().

virtual UInt64 Legion::OwnershipManager::requestInitiateAcquisition ( ClientIdentifier  acquiringClientId,
Span< GlobalIdentifier globalIds,
Span< char >  privateData 
)
virtual

Request another client initiate an ownership acquisition of the given attributes Return a transaction ID for the request (will be delivered in corresponding InitiateAcquisitionResult callback)

static void Legion::OwnershipManager::requestRejectedCallback ( void *  usr,
requestRejectedCallbackParameters   
)
staticprotected

Friends And Related Function Documentation

friend class Connection
friend

Member Data Documentation

std::vector<CallbackData*> Legion::OwnershipManager::myAcquiredCallbacks
protected
DatabaseHandle Legion::OwnershipManager::myDatabaseHandle
protected
std::vector<CallbackData*> Legion::OwnershipManager::myDivestitureRequestCallbacks
protected
OwnershipManagerHandle Legion::OwnershipManager::myHandle
protected
std::vector<CallbackData*> Legion::OwnershipManager::myInitiateAcquisitionRequestCallbacks
protected
std::vector<CallbackData*> Legion::OwnershipManager::myInitiateAcquisitionResultCallbacks
protected
std::vector<CallbackData*> Legion::OwnershipManager::myRequestRejectedCallbacks
protected

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

Document ID: Generated on Mon Mar 8 15:11:30 EST 2021 from SVN revision 225633
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)