Files
2014-06-30 13:58:10 +02:00

66 lines
1.5 KiB
C++

/*
* File: CloudStorage.h
* Author: jgaebler
*
* Created on April 26, 2012, 3:05 PM
*/
#ifndef CLOUDSTORAGE_H
#define CLOUDSTORAGE_H
#include "../StorageService.h"
#include "transfer/TransferList.h"
#include "mt/MulticastMessageQueue.h"
#define DEFAULT_NUMBER_OF_MESSAGES_PER_UPLOAD 1
namespace ubeeme {
namespace moversight {
class MulticastMessage;
class CloudProvider;
/**
* @brief Implementation of the storage service interface. The class
* implements a storing service, which uses the cloud to store and
* retrieve message. The messages are used to enable the virtual synchrony
* within the group, after a disconnected peer re-joins the group.
* @class CloudStorage
* @author Jan Gäbler
* @ingroup Moversight
*/
class CloudStorage : public StorageService {
public:
CloudStorage(Dispatcher & dis);
virtual ~CloudStorage();
virtual void initialise();
virtual void finalise();
virtual void store(MulticastMessage & m);
virtual MulticastMessageQueue retrieve(VirtualLogicalTime const & lastSeenLt);
void setNumberOfMessagesPerUpload(size_t mpu);
size_t getNumberOfMessagesPerUpload();
private:
CloudProvider * provider;
TransferList list;
GenericTime lastUpload;
size_t numberOfMessagesPerUpload;
};
}
}
#endif /* CLOUDSTORAGE_H */