- com
- pcbsys
- nirvana
- client
- nQueuePeekContext
Provides a context when peeking on the queue. More...
#include <nQueuePeekContext.h>
Inherits com::pcbsys::foundation::fbase::CountableObject.
Public Member Functions | |
int | getIndex () |
Returns the index into the queue that the context is up to. | |
const std::string | getSelector () |
Retrieves the message selector (if any) set to filter events on this peek context. | |
int | getWindowSize () |
Retrieves the size of the window used by this queue peek context. | |
bool | hasMore () |
Returns a boolean indicating if there are any more events in the queue. | |
nQueuePeekContext (int windowSize=0, const std::string selector="") | |
Creates a queue peek context with the specified window size and message selector to filter events with. | |
void | setHasMore (bool flag) |
Sets the flag to true if more events in the queue. | |
void | setIndex (int idx) |
void | setWindowSize (int size) |
Sets the size of the window. | |
Provides a context when peeking on the queue.
Useful when multiple calls are required to traverse the entire queue.
com::pcbsys::nirvana::client::nQueuePeekContext::nQueuePeekContext | ( | int | windowSize = 0 , |
const std::string | selector = "" |
||
) |
Creates a queue peek context with the specified window size and message selector to filter events with.
windowSize | Number of events which will be delivered to the client per lookup |
selector | Message selector to apply to the events |
int com::pcbsys::nirvana::client::nQueuePeekContext::getIndex | ( | ) |
Returns the index into the queue that the context is up to.
const std::string com::pcbsys::nirvana::client::nQueuePeekContext::getSelector | ( | ) |
Retrieves the message selector (if any) set to filter events on this peek context.
int com::pcbsys::nirvana::client::nQueuePeekContext::getWindowSize | ( | ) |
Retrieves the size of the window used by this queue peek context.
bool com::pcbsys::nirvana::client::nQueuePeekContext::hasMore | ( | ) |
Returns a boolean indicating if there are any more events in the queue.
void com::pcbsys::nirvana::client::nQueuePeekContext::setHasMore | ( | bool | flag | ) |
Sets the flag to true if more events in the queue.
(Server specific).
flag | to specify whether there are more events to come |
void com::pcbsys::nirvana::client::nQueuePeekContext::setIndex | ( | int | idx | ) |
idx | Index value to set |
void com::pcbsys::nirvana::client::nQueuePeekContext::setWindowSize | ( | int | size | ) |
Sets the size of the window.
size | A size greater than 0 |