00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _PROPHET_ORACLE_H_
00018 #define _PROPHET_ORACLE_H_
00019
00020 #include "Params.h"
00021 #include "Stats.h"
00022 #include "Table.h"
00023 #include "Repository.h"
00024 #include "AckList.h"
00025 #include "BundleCore.h"
00026
00027 namespace prophet
00028 {
00029
00035 class Oracle
00036 {
00037 public:
00038 virtual ~Oracle() {}
00039
00040 virtual const ProphetParams* params() const = 0;
00041 virtual Stats* stats() = 0;
00042 virtual Table* nodes() = 0;
00043 virtual AckList* acks() = 0;
00044 virtual BundleCore* core() = 0;
00045 virtual void ack(const prophet::Bundle* b)
00046 {
00047 if (b == NULL) return;
00048 acks()->insert(b,core());
00049 stats()->drop_bundle(b);
00050 core()->drop_bundle(b);
00051 }
00052 };
00053
00054 };
00055
00056 #endif // _PROPHET_ORACLE_H_