Files
scandocs/uni/masterarbeit/source/moversight/fd/partition/ReducedRosterQueue.h
2014-06-30 13:58:10 +02:00

55 lines
1.6 KiB
C++

/*
* File: ReducedRosterQueue.h
* Author: gschneid
*
* Created on September 18, 2012, 2:12 PM
*/
#ifndef REDUCEDROSTERQUEUE_H
#define REDUCEDROSTERQUEUE_H
#include "common/container/PairQueue.h"
#include "common/Exception.h"
#include "common/container/PeerIDList.h"
namespace ubeeme {
namespace moversight {
/**
* @class ReducedRosterQueue
* @brief Provides a queue to store elements of the kind <PeerID, TransportAddress> to save
* the needed pairs for the shortened roster to oversend when a rejoin is started.
* @author Grit Schneider
* @ingroup Moversight
*/
class ReducedRosterQueue : public PairQueue<PeerID, TransportAddress> {
public:
/**
* @brief Adds the given object with the correct key to the queue.
* @param ta The associated object.
* @throws LogicException - because its not possible to get the needed information to add
* both parameters out of one of them.
*/
void add(TransportAddress ta) {
throw LogicException("Not working here");
}//End
/**
* @brief Adds the given key and value to the queue.
* @param pID The key to add - here its the PeerID.
* @param ta The value to add with its key - here its the transportaddress which has maybe changed.
*/
void add(PeerID pID, TransportAddress ta) {
PairQueue<PeerID, TransportAddress>::add(pID, ta);
}
};
};
};
#endif /* REDUCEDROSTERQUEUE_H */