CAVERN IRB Key class
![]() | CAVERN_irbKeyBlocking_t Used to specify if specific key operations should block till completion or not (See put(), deliver(), deliverIncludingPassive())
| ||||
![]() | CAVERN_irbKeyEvent_t Trigger event types for keys.
| ||||
![]() | CAVERN_irbKeyTrigger_t Used to specify that when the data eventually reaches its destination, whether to call the key's trigger callback function via a separately spawned thread or not
| ||||
![]() | status_t Status codes returned from CAVERN_irbKey_c methods. |
![]() | allocDirect (char *&direct, int *sze, CAVERN_irbKey_c::status_t *status) Similar to getDirect |
![]() | commit (CAVERN_irbKey_c::status_t *status) Commit the local key to persistent store |
![]() | deliver (CAVERN_irbKey_c::status_t *status, CAVERN_irbKey_c::CAVERN_irbKeyBlocking_t blockingType = CAVERN_irbKey_c::NON_BLOCKING, CAVERN_irbKey_c::CAVERN_irbKeyTrigger_t triggerType = CAVERN_irbKey_c::NON_THREADED_TRIGGER) Dispatch data inside current key |
![]() | deliverIncludingPassive (CAVERN_irbKey_c::status_t *status, CAVERN_irbKey_c::CAVERN_irbKeyBlocking_t blockingType = CAVERN_irbKey_c::NON_BLOCKING, CAVERN_irbKey_c::CAVERN_irbKeyTrigger_t triggerType = CAVERN_irbKey_c::NON_THREADED_TRIGGER) This does the same thing as deliver except it delivers to passive links as well |
![]() | export (char *filename, CAVERN_irbKey_c::status_t *status) Export a key to an output file |
![]() | get (char *bufferToFill, int *sze, CAVERN_irbKey_c::status_t *status) Get a copy of the data from key |
![]() | getAutoAlloc (char *&autoAllocatedBuffer, int *sze, CAVERN_irbKey_c::status_t *status) Get a copy of the data in the key but auto allocate memory for the buffer |
![]() | getDirect (char *&direct, int *sze, CAVERN_irbKey_c::status_t *status) Get the direct pointer to the data in the key |
![]() | getKeyId () Get a copy of the key Id that defined this key. |
![]() | getMeta (char *bufferToFill, int *sze, CAVERN_irbKey_c::status_t *status) Get a copy of the meta data from key |
![]() | getMetaSize (int *sze, CAVERN_irbKey_c::status_t *status) Get the size of the meta data |
![]() | getSize (int *sze, CAVERN_irbKey_c::status_t *status) Get size of data in key. |
![]() | import (char *filename, int *sze, CAVERN_irbKey_c::status_t *status, CAVERN_irbKey_c::CAVERN_irbKeyBlocking_t blockingType = CAVERN_irbKey_c::NON_BLOCKING, CAVERN_irbKey_c::CAVERN_irbKeyTrigger_t triggerType = CAVERN_irbKey_c::NON_THREADED_TRIGGER) Import data into key from a file |
![]() | import (char *filename, int *sze, char* metaData, int *metaSize, CAVERN_irbKey_c::status_t *status, CAVERN_irbKey_c::CAVERN_irbKeyBlocking_t blockingType = CAVERN_irbKey_c::NON_BLOCKING, CAVERN_irbKey_c::CAVERN_irbKeyTrigger_t triggerType = CAVERN_irbKey_c::NON_THREADED_TRIGGER) Import data into key from a file |
![]() | put (char *buffer, int *sze, char* metaData, int* metaSize, CAVERN_irbKey_c::status_t *status, CAVERN_irbKey_c::CAVERN_irbKeyBlocking_t blockingType = CAVERN_irbKey_c::NON_BLOCKING, CAVERN_irbKey_c::CAVERN_irbKeyTrigger_t triggerType = CAVERN_irbKey_c::NON_THREADED_TRIGGER) Put data into key |
![]() | put (char *buffer, int *sze, CAVERN_irbKey_c::status_t *status, CAVERN_irbKey_c::CAVERN_irbKeyBlocking_t blockingType = CAVERN_irbKey_c::NON_BLOCKING, CAVERN_irbKey_c::CAVERN_irbKeyTrigger_t triggerType = CAVERN_irbKey_c::NON_THREADED_TRIGGER) Put data into key |
![]() | releaseDirect (CAVERN_irbKey_c::status_t *status) Release the pointer to the data in the key |
![]() | setMeta (char *meta, int *size, CAVERN_irbKey_c::status_t *status) Set the meta data field of a key |
![]() | trigger (void (*callback)(CAVERN_irbKey_c::CAVERN_irbKeyEvent_t event, CAVERN_irbKey_c *thisKey, void* userData), void* userData) Trigger on an event |
![]() | ~CAVERN_irbKey_c () The destructor will dereference the local key so that it may be garbage collected to free up CAVERN's resources |
![]() | CAVERN_irbKeyBlocking_t Used to specify if specific key operations should block till completion or not (See put(), deliver(), deliverIncludingPassive())
| ||||
![]() | CAVERN_irbKeyEvent_t Trigger event types for keys.
| ||||
![]() | CAVERN_irbKeyTrigger_t Used to specify that when the data eventually reaches its destination, whether to call the key's trigger callback function via a separately spawned thread or not
| ||||
![]() | status_t Status codes returned from CAVERN_irbKey_c methods. |
CAVERN IRB Key class. Objects of this type are instantiated by calling CAVERN_irb_c::define(). When you are done refering to the key delete it to free up system resources.
Typical use of this function is: aKey->allocDirect(buffer,....); fillBufferWithData(buffer); aKey->releaseDirect(); aKey->deliver(......); Warning. There is currently nothing that guarantees that
the data in the key won't be updated by new incoming data
between the time of releaseDirect() and deliver().
Delivery abides by the constraints set by CAVERN_linkAttrib_c
during the creation of the link. See CAVERN_irbLink_c and CAVERN_linkAttrib_c.
Also note that when this CAVERN_irbKey_c object is deleted the
trigger is also removed. Even if you have other CAVERN_irbKey_c objects
that are defined to the same path and key, the trigger is always
associated with the object that performed the trigger() call.
void put(char *buffer, int *sze, char* metaData, int* metaSize, CAVERN_irbKey_c::status_t *status, CAVERN_irbKey_c::CAVERN_irbKeyBlocking_t blockingType = CAVERN_irbKey_c::NON_BLOCKING, CAVERN_irbKey_c::CAVERN_irbKeyTrigger_t triggerType = CAVERN_irbKey_c::NON_THREADED_TRIGGER)
sze - amount of data to copy. Returns num of bytes successfully copied.
metaData - assigns meta data field of a key.
Meta data means data about the data.
Meta data is intended
to be small. One e.g. of its use is to send type information about the data
in a key.
metaSize - size of meta data. Returns num of bytes successfully copied.
status - returns status:
FAIL occurs if any general problems occurred (like internal mem allocation)
KEY_STALE occurs if this key is no longer valid for data access.
OK is returned if the put is successful.
blockingType - if set to BLOCKING will return only after the data has
been delivered, otherwise this function will return immediately after having
initiated delivery. Blocking is ususually used if you don't wish to
continue with the flow of your program until a piece of data has
been guaranteed to be delivered to the destination. For example
you would perform a blocking put before you did a remoteCommit on a link.
triggerType - if set to THREADED_TRIGGER, the threaded handler will
be called; if set to NON_THREADED_TRIGGER, the non-threaded handler will
be called. See CAVERN_irbKeyTrigger_t for more details. void import(char *filename, int *sze, CAVERN_irbKey_c::status_t *status, CAVERN_irbKey_c::CAVERN_irbKeyBlocking_t blockingType = CAVERN_irbKey_c::NON_BLOCKING, CAVERN_irbKey_c::CAVERN_irbKeyTrigger_t triggerType = CAVERN_irbKey_c::NON_THREADED_TRIGGER)
sze - this returns the size of the file loaded.
status - returns status:
FAIL occurs if any general problems occurred (like internal mem allocation)
KEY_STALE occurs if this key is no longer valid for data access.
OK is returned if the put is successful.
blockingType - if set to BLOCKING will return only after the data has
been delivered, otherwise this function will return immediately after having
initiated delivery. Blocking is ususually used if you don't wish to
continue with the flow of your program until a piece of data has
been guaranteed to be delivered to the destination. For example
you would perform a blocking put before you did a remoteCommit on a link.
triggerType - if set to THREADED_TRIGGER, the threaded handler will
be called; if set to NON_THREADED_TRIGGER, the non-threaded handler will
be called. See CAVERN_irbKeyTrigger_t for more details. void import(char *filename, int *sze, char* metaData, int *metaSize, CAVERN_irbKey_c::status_t *status, CAVERN_irbKey_c::CAVERN_irbKeyBlocking_t blockingType = CAVERN_irbKey_c::NON_BLOCKING, CAVERN_irbKey_c::CAVERN_irbKeyTrigger_t triggerType = CAVERN_irbKey_c::NON_THREADED_TRIGGER)
sze - this returns the size of the file loaded.
metaData - assigns meta data field of a key.
Meta data means data about the data.
Meta data is intended
to be small. One e.g. of its use is to send type information about the data
in a key.
metaSize - size of meta data. Returns num of bytes successfully copied.
status - returns status:
FAIL occurs if any general problems occurred (like internal mem allocation)
KEY_STALE occurs if this key is no longer valid for data access.
OK is returned if the put is successful.
blockingType - if set to BLOCKING will return only after the data has
been delivered, otherwise this function will return immediately after having
initiated delivery. Blocking is ususually used if you don't wish to
continue with the flow of your program until a piece of data has
been guaranteed to be delivered to the destination. For example
you would perform a blocking put before you did a remoteCommit on a link.
triggerType - if set to THREADED_TRIGGER, the threaded handler will
be called; if set to NON_THREADED_TRIGGER, the non-threaded handler will
be called. See CAVERN_irbKeyTrigger_t for more details. void export(char *filename, CAVERN_irbKey_c::status_t *status)
filename - is output file to export to. void get(char *bufferToFill, int *sze, CAVERN_irbKey_c::status_t *status)
sze - is the size of the data buffer provided. Sze returns the
size of the data copied into the buffer.
status - returns status:
BUFFER_TOO_SMALL occurs when
the data in the key is larger than data buffer provided by user.
OK if everything was fine.
KEY_STALE if for some reason this key is no longer active. void getMetaSize(int *sze, CAVERN_irbKey_c::status_t *status)
void setMeta(char *meta, int *size, CAVERN_irbKey_c::status_t *status)
size - is size of meta data. Returns num of bytes successfully copied. void getMeta(char *bufferToFill, int *sze, CAVERN_irbKey_c::status_t *status)
sze - is the size of the data buffer provided. Sze returns the
size of the meta data copied into the buffer.
status - returns status:
BUFFER_TOO_SMALL occurs when
the meta data in the key is larger than data buffer provided by user.
OK if everything was fine.
KEY_STALE if for some reason this key is no longer active. void getAutoAlloc(char *&autoAllocatedBuffer, int *sze, CAVERN_irbKey_c::status_t *status)
void getDirect(char *&direct, int *sze, CAVERN_irbKey_c::status_t *status)
void allocDirect(char *&direct, int *sze, CAVERN_irbKey_c::status_t *status)
void releaseDirect(CAVERN_irbKey_c::status_t *status)
void commit(CAVERN_irbKey_c::status_t *status)
void deliver(CAVERN_irbKey_c::status_t *status, CAVERN_irbKey_c::CAVERN_irbKeyBlocking_t blockingType = CAVERN_irbKey_c::NON_BLOCKING, CAVERN_irbKey_c::CAVERN_irbKeyTrigger_t triggerType = CAVERN_irbKey_c::NON_THREADED_TRIGGER)
blockingType - if set to BLOCKING will return only after the data has
been delivered, otherwise this function will return immediately after having
initiated delivery. Blocking is ususually used if you don't wish to
continue with the flow of your program until a piece of data has
been guaranteed to be delivered to the destination. For example
you would perform a blocking put before you did a remoteCommit on a link.
triggerType - if set to THREADED_TRIGGER, the threaded handler will
be called; if set to NON_THREADED_TRIGGER, the non-threaded handler will
be called. See CAVERN_irbKeyTrigger_t for more details. void deliverIncludingPassive(CAVERN_irbKey_c::status_t *status, CAVERN_irbKey_c::CAVERN_irbKeyBlocking_t blockingType = CAVERN_irbKey_c::NON_BLOCKING, CAVERN_irbKey_c::CAVERN_irbKeyTrigger_t triggerType = CAVERN_irbKey_c::NON_THREADED_TRIGGER)
blockingType - if set to BLOCKING will return only after the data has
been delivered, otherwise this function will return immediately after having
initiated delivery. Blocking is ususually used if you don't wish to
continue with the flow of your program until a piece of data has
been guaranteed to be delivered to the destination. For example
you would perform a blocking put before you did a remoteCommit on a link.
triggerType - if set to THREADED_TRIGGER, the threaded handler will
be called; if set to NON_THREADED_TRIGGER, the non-threaded handler will
be called. See CAVERN_irbKeyTrigger_t for more details. void trigger(void (*callback)(CAVERN_irbKey_c::CAVERN_irbKeyEvent_t event, CAVERN_irbKey_c *thisKey, void* userData), void* userData)
userData - is address of data to pass into callback.
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de