UT_NetBarrier Class Reference

#include <UT_NetMessage.h>

List of all members.

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_NetSocketmyToSelf
bool myError
int myBarrierValue
UT_String myTrackerAddr
int myTrackerPort
UT_String myJobName


Detailed Description

UT_NetBarrier

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.


Constructor & Destructor Documentation

UT_NetBarrier::UT_NetBarrier ( const char *  trackeraddr,
int  trackerport,
const char *  jobname 
)

virtual UT_NetBarrier::~UT_NetBarrier (  )  [virtual]


Member Function Documentation

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.


Member Data Documentation

Definition at line 522 of file UT_NetMessage.h.

bool UT_NetBarrier::myError [protected]

Definition at line 520 of file UT_NetMessage.h.

Definition at line 526 of file UT_NetMessage.h.

Definition at line 518 of file UT_NetMessage.h.

Definition at line 519 of file UT_NetMessage.h.

Definition at line 524 of file UT_NetMessage.h.

Definition at line 525 of file UT_NetMessage.h.


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

Generated on Fri May 25 00:10:51 2012 for HDK by  doxygen 1.5.9