Page MenuHomePhabricator

D3788.id11789.diff
No OneTemporary

D3788.id11789.diff

diff --git a/services/blob/CMakeLists.txt b/services/blob/CMakeLists.txt
--- a/services/blob/CMakeLists.txt
+++ b/services/blob/CMakeLists.txt
@@ -52,6 +52,7 @@
include_directories(
./src
./src/DatabaseEntities
+ ./src/Reactors/
./src/Reactors/server
./src/Reactors/server/base-reactors
./_generated
diff --git a/services/blob/src/Reactors/BaseReactor.h b/services/blob/src/Reactors/BaseReactor.h
new file mode 100644
--- /dev/null
+++ b/services/blob/src/Reactors/BaseReactor.h
@@ -0,0 +1,31 @@
+#pragma once
+
+#include <grpcpp/grpcpp.h>
+
+namespace comm {
+namespace network {
+namespace reactor {
+
+enum class ReactorState {
+ NONE = 0,
+ RUNNING = 1,
+ TERMINATED = 2,
+ DONE = 3,
+};
+
+class BaseReactor {
+protected:
+ ReactorState state = ReactorState::NONE;
+public:
+ ReactorState getState() const {
+ return this->state;
+ }
+ virtual void terminate(const grpc::Status &status){};
+ virtual void validate(){};
+ virtual void doneCallback(){};
+ virtual void terminateCallback(){};
+};
+
+} // namespace reactor
+} // namespace network
+} // namespace comm

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 1, 7:00 AM (21 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2604132
Default Alt Text
D3788.id11789.diff (1 KB)

Event Timeline