class CAVERN_irbLink_c

Link management class

Public Classes

enum CAVERN_linkBlocking_t
Used to set either blocking or non-blocking remote request.
NON_BLOCKING
Non blocking remote request.
BLOCKING
Blocking remote request.
enum CAVERN_linkEvent_t
Trigger event types for links.
REMOTE_REQUEST
This event occurs when there is news about a remote request.
enum CAVERN_requestType_t
Remote request types.
DEFAULT
Default request will compare timestamps.
FORCED_REQUEST
Forced request will always download data regardless of timestamps.
enum status_t
Status codes returned from CAVERN_irbLink_c member functions.
FAILED
Operation failed
OK
Operation succeeded
TIMED_OUT
Operation timed out
NO_DOWNLOAD_NEEDED
This is a status message returned from a remote request if the synchronizing time stamps determine that a remote download was not necessary.

Public Methods

void commitRemote (status_t *status)
Tell the remote IRB to commit the remote key's data to persistent data store
void requestRemote (CAVERN_requestType_t requestType, status_t *status, CAVERN_irbLink_c::CAVERN_linkBlocking_t blocking = CAVERN_irbLink_c::NON_BLOCKING, int timeOutTime = 30)
Request the data from a remote source over a specific link
void trigger (void (*callback)(CAVERN_irbLink_c::CAVERN_linkEvent_t event, CAVERN_irbLink_c *thisLink, CAVERN_irbLink_c::status_t status, void* userData), void* userData)
Set a user-specified callback to be called when an event occurs
~CAVERN_irbLink_c ()
This destructor will also unlink the link.

Public

enum CAVERN_linkBlocking_t
Used to set either blocking or non-blocking remote request.
NON_BLOCKING
Non blocking remote request.
BLOCKING
Blocking remote request.
enum CAVERN_linkEvent_t
Trigger event types for links.
REMOTE_REQUEST
This event occurs when there is news about a remote request.
enum CAVERN_requestType_t
Remote request types.
DEFAULT
Default request will compare timestamps.
FORCED_REQUEST
Forced request will always download data regardless of timestamps.
enum status_t
Status codes returned from CAVERN_irbLink_c member functions.
FAILED
Operation failed
OK
Operation succeeded
TIMED_OUT
Operation timed out
NO_DOWNLOAD_NEEDED
This is a status message returned from a remote request if the synchronizing time stamps determine that a remote download was not necessary.

Documentation

Link management class. This class allows you to manage a link. It allows you to commit the data in a remote key to a persistent data-store. It allows you to explicitly request data from a remote key rather than having to wait for data to be automatically propagated to you. More features will be added with time.
void trigger(void (*callback)(CAVERN_irbLink_c::CAVERN_linkEvent_t event, CAVERN_irbLink_c *thisLink, CAVERN_irbLink_c::status_t status, void* userData), void* userData)
Set a user-specified callback to be called when an event occurs. Callback should be of the form:

void callback(CAVERN_irbLink_c::CAVERN_linkEvent_t event, CAVERN_irbLink_c *thisLink, CAVERN_irbLink_c::status_t status, void* userData);

This callback may receive for e.g. a REMOTE_REQUEST event with a status of TIMED_OUT.

Parameters:
userData - is for passing any user data to the callback on invocation.

void commitRemote(status_t *status)
Tell the remote IRB to commit the remote key's data to persistent data store
Parameters:
status - returns either FAILED or OK.

void requestRemote(CAVERN_requestType_t requestType, status_t *status, CAVERN_irbLink_c::CAVERN_linkBlocking_t blocking = CAVERN_irbLink_c::NON_BLOCKING, int timeOutTime = 30)
Request the data from a remote source over a specific link. Used primarily for passive updates. Callback of remote request could get status: FAILED, NO_DOWNLOAD_NEEDED, TIMED_OUT or OK. OK event means data will be transmitted to your locally linked key. This will fire the irb Key's callback for new incoming data.
Parameters:
timeOutTime - is the time (in seconds) this request waits for either status information or incoming data. When timeout occurs a TIME_OUT event will fire.
blocking - is used to make this request a blocking or non-blocking request. If non-blocking then this function will return immediately with either a status of OK or FAILED that reflects the status of calling this request (ie not the status of the result of the completed request). The callback will actually reveal the true status of the completed request. If blocking then this function waits till remote status information arrives and remote data is completely downloaded (whichever occurs first). The status in this case would be the status of the completed request- i.e. the status the callback would get.


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de