75 lines
2.2 KiB
C++
75 lines
2.2 KiB
C++
/*
|
|
* File: P2PStorage.cc
|
|
* Author: jgaebler
|
|
*
|
|
* Created on August 20, 2012, 11:39 AM
|
|
*/
|
|
|
|
#include "P2PStorage.h"
|
|
|
|
#if P2P_SYNC_ENABLED
|
|
|
|
#undef DEBUG
|
|
#define DEBUG(msg) if (module.isPrintDebugMOB()){ if(dispatcher.getLocalState()== DISJOINED){ MOV_DEBUG <<"P2PS@TA_"<<module.getLocalAddress()<<" "<<msg<<endl; } else{ MOV_DEBUG <<"P2PS@"<<dispatcher.getLocalID() <<" "<< msg <<endl; } }
|
|
|
|
namespace ubeeme {
|
|
namespace moversight {
|
|
|
|
/**
|
|
* @brief Constructor
|
|
* @param d The dispatcher module.
|
|
*/
|
|
P2PStorage::P2PStorage(Dispatcher & dis) : StorageService(dis) {
|
|
}
|
|
|
|
/**
|
|
* @brief Default destructor
|
|
*
|
|
*/
|
|
P2PStorage::~P2PStorage() {
|
|
}
|
|
|
|
/**
|
|
* @brief Initialize the p2p storage service
|
|
* This method initialize the p2p storage module, by setting up all needed values.
|
|
* The method is called by the sync service. After initialize, the p2p storage service is ready
|
|
* to offer its services.
|
|
*/
|
|
void
|
|
P2PStorage::initialise() {
|
|
}
|
|
|
|
/**
|
|
* @brief This method finalizes the p2p storage service.
|
|
*/
|
|
void
|
|
P2PStorage::finalise() {
|
|
}
|
|
|
|
/**
|
|
* @brief Stores a message in the p2p network for synchronization.
|
|
* @param m The message to store.
|
|
*/
|
|
void
|
|
P2PStorage::store( MulticastMessage & /* m */) {
|
|
// throw NotImplementedYetException("not implemented yet - store");
|
|
}
|
|
|
|
/**
|
|
* @brief Retrieves messages from the cloud to resync the peer. The
|
|
* lastSeenLt determines the virtual logical time of the last successfully
|
|
* seen message locally. Thus, the messages retrieved from the cloud
|
|
* are up from the lastSeenLt logical time.
|
|
* @param lastSeenLt The virtual time of the last seen message.
|
|
* @return The list of missed messages, found in the cloud, starting from lastSeenLt
|
|
*/
|
|
MulticastMessageQueue
|
|
P2PStorage::retrieve(VirtualLogicalTime const & /* lastSeenLt */) {
|
|
throw NotImplementedYetException("not implemented yet - retrieve");
|
|
}
|
|
|
|
#endif
|
|
|
|
}
|
|
}
|