Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

AuroraNode::DequeueHandle Class Reference

#include <AuroraNode.h>

List of all members.


Detailed Description

A handle that may be used to dequeue tuples.

You can obtain a handle using AuroraNode::getDequeueHandle() Once a handle is closed, it is invalid and may not be used further for dequeuing.

This class is threadsafe: you may call AuroraNode::getDequeueHandle(), and the subscribe(), dequeue(), and close() methods of this class, at any time when the network is running. subscribe() and close() may be invoked even when dequeue() is blocking.


Public Member Functions

 DequeueHandle ()
void subscribe (string name) throw ( AuroraException )
 Subscribe to a stream.
void unsubscribe (string name) throw ( AuroraException )
 Subscribe to a stream.
size_t dequeue (string &stream_name, TupleDescription &td, void *buffer, size_t buffer_size) throw ( AuroraException )
 Dequeue tuples from any subscribed stream.
void close ()
 Closes the handle for dequeueing, causing any pending dequeue() operations to return 0.


Constructor & Destructor Documentation

AuroraNode::DequeueHandle::DequeueHandle  ) 
 


Member Function Documentation

void AuroraNode::DequeueHandle::close  ) 
 

Closes the handle for dequeueing, causing any pending dequeue() operations to return 0.

size_t AuroraNode::DequeueHandle::dequeue string &  stream_name,
TupleDescription &  td,
void *  buffer,
size_t  buffer_size
throw ( AuroraException )
 

Dequeue tuples from any subscribed stream.

This method blocks until

  • at least one tuple is available on any subscribed stream, or
  • close() is called, or
  • the node is shut down.

Sets stream_name to the name of stream and td to the description of the tuples that have been dequeued. Up to buffer_size bytes are written to the buffer (the actual number of bytes written can be calculated as return-value * td.getSizeInBytes()).

Returns:
the number of tuples dequeued, or 0 if close() was called or the node has been shut down

void AuroraNode::DequeueHandle::subscribe string  name  )  throw ( AuroraException )
 

Subscribe to a stream.

Future calls to dequeue() will return tuples from this stream.

void AuroraNode::DequeueHandle::unsubscribe string  name  )  throw ( AuroraException )
 

Subscribe to a stream.

Future calls to dequeue() will not return tuples from this stream.


The documentation for this class was generated from the following files:
Generated on Fri Nov 12 15:15:23 2004 for Borealis by doxygen 1.3.8