Sirikata
Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends
Sirikata::ForwarderServiceQueue Class Reference

Fairly distributes inter-space node bandwidth between services, e.g. More...

#include <ForwarderServiceQueue.hpp>

Collaboration diagram for Sirikata::ForwarderServiceQueue:

List of all members.

Classes

class  Listener

Public Types

typedef uint32 ServiceID
typedef AbstractQueue< Message * > MessageQueue
typedef std::tr1::function
< MessageQueue *(ServerID,
uint32)> 
MessageQueueCreator

Public Member Functions

 ForwarderServiceQueue (ServerID this_server, uint32 size, Listener *listener)
 ~ForwarderServiceQueue ()
void addService (ServiceID svc, MessageQueueCreator creator=0)
Messagefront (ServerID sid)
Messagepop (ServerID sid)
bool empty (ServerID sid)

Private Types

typedef FairQueue< Message,
ServiceID, MessageQueue
OutgoingFairQueue
typedef
std::tr1::unordered_map
< ServerID, OutgoingFairQueue * > 
ServerQueueMap
typedef
std::tr1::unordered_map
< ServiceID,
MessageQueueCreator
MessageQueueCreatorMap

Private Member Functions

QueueEnum::PushResult push (ServiceID svc, Message *msg)
void prePush (ServerID sid)
void notifyPushFront (ServerID sid, ServiceID svc)
uint32 size (ServerID sid, ServiceID svc)
OutgoingFairQueuegetServerFairQueue (ServerID sid)
OutgoingFairQueuecheckServiceQueue (OutgoingFairQueue *ofq, ServiceID svc_id)

Private Attributes

ServerID mThisServer
MessageQueueCreatorMap mQueueCreators
ServerQueueMap mQueues
uint32 mQueueSize
ListenermListener
boost::mutex mMutex

Friends

class Forwarder
class ForwarderServerMessageRouter
class ODPFlowScheduler

Detailed Description

Fairly distributes inter-space node bandwidth between services, e.g.

object message routing, PINTO, Loc, etc. Messages are broken down by destination server, then by service. The entire ForwarderServiceQueue is a set of fair queues over services, grouped by destination server.


Member Typedef Documentation

typedef std::tr1::function<MessageQueue*(ServerID,uint32)> Sirikata::ForwarderServiceQueue::MessageQueueCreator
typedef std::tr1::unordered_map<ServerID, OutgoingFairQueue*> Sirikata::ForwarderServiceQueue::ServerQueueMap [private]

Constructor & Destructor Documentation

Sirikata::ForwarderServiceQueue::ForwarderServiceQueue ( ServerID  this_server,
uint32  size,
Listener listener 
)
Sirikata::ForwarderServiceQueue::~ForwarderServiceQueue ( )

References mQueues.


Member Function Documentation

void Sirikata::ForwarderServiceQueue::addService ( ServiceID  svc,
MessageQueueCreator  creator = 0 
)
ForwarderServiceQueue::OutgoingFairQueue * Sirikata::ForwarderServiceQueue::checkServiceQueue ( OutgoingFairQueue ofq,
ServiceID  svc_id 
) [private]
bool Sirikata::ForwarderServiceQueue::empty ( ServerID  sid)
Message * Sirikata::ForwarderServiceQueue::front ( ServerID  sid)
ForwarderServiceQueue::OutgoingFairQueue * Sirikata::ForwarderServiceQueue::getServerFairQueue ( ServerID  sid) [private]
void Sirikata::ForwarderServiceQueue::notifyPushFront ( ServerID  sid,
ServiceID  svc 
) [private]
Message * Sirikata::ForwarderServiceQueue::pop ( ServerID  sid)
void Sirikata::ForwarderServiceQueue::prePush ( ServerID  sid) [private]
QueueEnum::PushResult Sirikata::ForwarderServiceQueue::push ( ServiceID  svc,
Message msg 
) [private]
uint32 Sirikata::ForwarderServiceQueue::size ( ServerID  sid,
ServiceID  svc 
) [private]

Friends And Related Function Documentation

friend class Forwarder [friend]
friend class ForwarderServerMessageRouter [friend]
friend class ODPFlowScheduler [friend]

Member Data Documentation

Referenced by notifyPushFront(), and push().

Referenced by addService(), and getServerFairQueue().

Referenced by getServerFairQueue().

Referenced by push().


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