#include <UT_NetMessage.h>
Public Member Functions | |
| UT_NetBarrier (const char *trackeraddr, int trackerport, const char *jobname) | |
| virtual | ~UT_NetBarrier () |
| void | setValue (int val) |
| void | waitValue (int val) |
| int | incrementValue (int defaultval) |
Protected Member Functions | |
| void | sendTrackerMessage (const char *msg, int value) |
| Creates and posts a message for the tracker. | |
| void | blockUntilComplete () |
| bool | pumpData (int timeoutms) |
Protected Attributes | |
| UT_NetMessagePump | myPump |
| UT_NetSocket * | myToSelf |
| bool | myError |
| int | myBarrierValue |
| UT_String | myTrackerAddr |
| int | myTrackerPort |
| UT_String | myJobName |
Very similar to UT_NetExchange, using the same tracker. However, it is meant for creating producer/consumer queues where the data is transmitted OOB (ie, on shared disk resource) The producer can call setValue() to indicate how far it has completed. The consumer can invoke waitValue() to idle until the setValue is equal or greater than the waitValue.
These calls will all block until success, error, or interrupt.
Definition at line 486 of file UT_NetMessage.h.
| UT_NetBarrier::UT_NetBarrier | ( | const char * | trackeraddr, | |
| int | trackerport, | |||
| const char * | jobname | |||
| ) |
| virtual UT_NetBarrier::~UT_NetBarrier | ( | ) | [virtual] |
| void UT_NetBarrier::blockUntilComplete | ( | ) | [protected] |
A simplified method for running the message pump until the system errors or is interrupted.
| int UT_NetBarrier::incrementValue | ( | int | defaultval | ) |
Returns current value of the barrier and then increments the barrier's value. Blocks until the tracker responds.
| bool UT_NetBarrier::pumpData | ( | int | timeoutms | ) | [protected] |
Returns true until the barrier has been resolved or error occurs
| void UT_NetBarrier::sendTrackerMessage | ( | const char * | msg, | |
| int | value | |||
| ) | [protected] |
Creates and posts a message for the tracker.
| void UT_NetBarrier::setValue | ( | int | val | ) |
Tells the tracker to update the barrier value to the given value. Does not listen for a tracker response.
| void UT_NetBarrier::waitValue | ( | int | val | ) |
Requests the tracker to alert us when the given value is reached on the barrier.
int UT_NetBarrier::myBarrierValue [protected] |
Definition at line 522 of file UT_NetMessage.h.
bool UT_NetBarrier::myError [protected] |
Definition at line 520 of file UT_NetMessage.h.
UT_String UT_NetBarrier::myJobName [protected] |
Definition at line 526 of file UT_NetMessage.h.
UT_NetMessagePump UT_NetBarrier::myPump [protected] |
Definition at line 518 of file UT_NetMessage.h.
UT_NetSocket* UT_NetBarrier::myToSelf [protected] |
Definition at line 519 of file UT_NetMessage.h.
UT_String UT_NetBarrier::myTrackerAddr [protected] |
Definition at line 524 of file UT_NetMessage.h.
int UT_NetBarrier::myTrackerPort [protected] |
Definition at line 525 of file UT_NetMessage.h.
1.5.9