Page MenuHomePhabricator

D3931.id12283.diff
No OneTemporary

D3931.id12283.diff

diff --git a/services/backup/src/Reactors/BaseReactor.h b/services/backup/src/Reactors/BaseReactor.h
--- a/services/backup/src/Reactors/BaseReactor.h
+++ b/services/backup/src/Reactors/BaseReactor.h
@@ -1,6 +1,6 @@
#pragma once
-#include "ReactorUtility.h"
+#include "ReactorStatusHolder.h"
#include <grpcpp/grpcpp.h>
@@ -12,7 +12,7 @@
class BaseReactor {
public:
- virtual std::shared_ptr<ReactorUtility> getUtility() = 0;
+ virtual std::shared_ptr<ReactorStatusHolder> getUtility() = 0;
virtual void terminate(const grpc::Status &status) = 0;
virtual void validate() = 0;
virtual void doneCallback() = 0;
diff --git a/services/backup/src/Reactors/ReactorUtility.h b/services/backup/src/Reactors/ReactorStatusHolder.h
rename from services/backup/src/Reactors/ReactorUtility.h
rename to services/backup/src/Reactors/ReactorStatusHolder.h
--- a/services/backup/src/Reactors/ReactorUtility.h
+++ b/services/backup/src/Reactors/ReactorStatusHolder.h
@@ -16,7 +16,7 @@
DONE = 3,
};
-class ReactorUtility {
+class ReactorStatusHolder {
private:
grpc::Status status = grpc::Status::OK;
std::mutex statusAccessMutex;
diff --git a/services/backup/src/Reactors/client/base-reactors/ClientBidiReactorBase.h b/services/backup/src/Reactors/client/base-reactors/ClientBidiReactorBase.h
--- a/services/backup/src/Reactors/client/base-reactors/ClientBidiReactorBase.h
+++ b/services/backup/src/Reactors/client/base-reactors/ClientBidiReactorBase.h
@@ -11,7 +11,7 @@
template <class Request, class Response>
class ClientBidiReactorBase : public grpc::ClientBidiReactor<Request, Response>,
public BaseReactor {
- std::shared_ptr<ReactorUtility> utility;
+ std::shared_ptr<ReactorStatusHolder> utility;
std::shared_ptr<Response> response = nullptr;
void nextWrite();
@@ -31,7 +31,7 @@
void OnReadDone(bool ok) override;
void terminate(const grpc::Status &status) override;
void OnDone(const grpc::Status &status) override;
- std::shared_ptr<ReactorUtility> getUtility() override;
+ std::shared_ptr<ReactorStatusHolder> getUtility() override;
virtual std::unique_ptr<grpc::Status> prepareRequest(
Request &request,
@@ -118,7 +118,7 @@
}
template <class Request, class Response>
-std::shared_ptr<ReactorUtility>
+std::shared_ptr<ReactorStatusHolder>
ClientBidiReactorBase<Request, Response>::getUtility() {
return this->utility;
}
diff --git a/services/backup/src/Reactors/client/base-reactors/ClientReadReactorBase.h b/services/backup/src/Reactors/client/base-reactors/ClientReadReactorBase.h
--- a/services/backup/src/Reactors/client/base-reactors/ClientReadReactorBase.h
+++ b/services/backup/src/Reactors/client/base-reactors/ClientReadReactorBase.h
@@ -11,7 +11,7 @@
template <class Request, class Response>
class ClientReadReactorBase : public grpc::ClientReadReactor<Response>,
public BaseReactor {
- std::shared_ptr<ReactorUtility> utility;
+ std::shared_ptr<ReactorStatusHolder> utility;
Response response;
public:
@@ -27,7 +27,7 @@
void OnReadDone(bool ok) override;
void terminate(const grpc::Status &status) override;
void OnDone(const grpc::Status &status) override;
- std::shared_ptr<ReactorUtility> getUtility() override;
+ std::shared_ptr<ReactorStatusHolder> getUtility() override;
virtual std::unique_ptr<grpc::Status> readResponse(Response &response) = 0;
};
@@ -97,7 +97,7 @@
}
template <class Request, class Response>
-std::shared_ptr<ReactorUtility>
+std::shared_ptr<ReactorStatusHolder>
ClientReadReactorBase<Request, Response>::getUtility() {
return this->utility;
}
diff --git a/services/backup/src/Reactors/client/base-reactors/ClientWriteReactorBase.h b/services/backup/src/Reactors/client/base-reactors/ClientWriteReactorBase.h
--- a/services/backup/src/Reactors/client/base-reactors/ClientWriteReactorBase.h
+++ b/services/backup/src/Reactors/client/base-reactors/ClientWriteReactorBase.h
@@ -11,7 +11,7 @@
template <class Request, class Response>
class ClientWriteReactorBase : public grpc::ClientWriteReactor<Request>,
public BaseReactor {
- std::shared_ptr<ReactorUtility> utility;
+ std::shared_ptr<ReactorStatusHolder> utility;
Request request;
void nextWrite();
@@ -29,7 +29,7 @@
void OnWriteDone(bool ok) override;
void terminate(const grpc::Status &status) override;
void OnDone(const grpc::Status &status) override;
- std::shared_ptr<ReactorUtility> getUtility() override;
+ std::shared_ptr<ReactorStatusHolder> getUtility() override;
virtual std::unique_ptr<grpc::Status> prepareRequest(Request &request) = 0;
};
@@ -104,7 +104,7 @@
}
template <class Request, class Response>
-std::shared_ptr<ReactorUtility>
+std::shared_ptr<ReactorStatusHolder>
ClientWriteReactorBase<Request, Response>::getUtility() {
return this->utility;
}
diff --git a/services/backup/src/Reactors/server/base-reactors/ServerBidiReactorBase.h b/services/backup/src/Reactors/server/base-reactors/ServerBidiReactorBase.h
--- a/services/backup/src/Reactors/server/base-reactors/ServerBidiReactorBase.h
+++ b/services/backup/src/Reactors/server/base-reactors/ServerBidiReactorBase.h
@@ -26,7 +26,7 @@
template <class Request, class Response>
class ServerBidiReactorBase : public grpc::ServerBidiReactor<Request, Response>,
public BaseReactor {
- std::shared_ptr<ReactorUtility> utility;
+ std::shared_ptr<ReactorStatusHolder> utility;
Request request;
Response response;
@@ -45,7 +45,7 @@
void OnDone() override;
void OnReadDone(bool ok) override;
void OnWriteDone(bool ok) override;
- std::shared_ptr<ReactorUtility> getUtility() override;
+ std::shared_ptr<ReactorStatusHolder> getUtility() override;
void terminate(ServerBidiReactorStatus status);
ServerBidiReactorStatus getStatus() const;
@@ -147,7 +147,7 @@
}
template <class Request, class Response>
-std::shared_ptr<ReactorUtility>
+std::shared_ptr<ReactorStatusHolder>
ServerBidiReactorBase<Request, Response>::getUtility() {
return this->utility;
}
diff --git a/services/backup/src/Reactors/server/base-reactors/ServerReadReactorBase.h b/services/backup/src/Reactors/server/base-reactors/ServerReadReactorBase.h
--- a/services/backup/src/Reactors/server/base-reactors/ServerReadReactorBase.h
+++ b/services/backup/src/Reactors/server/base-reactors/ServerReadReactorBase.h
@@ -16,7 +16,7 @@
template <class Request, class Response>
class ServerReadReactorBase : public grpc::ServerReadReactor<Request>,
public BaseReactor {
- std::shared_ptr<ReactorUtility> utility;
+ std::shared_ptr<ReactorStatusHolder> utility;
Request request;
protected:
@@ -32,7 +32,7 @@
void OnReadDone(bool ok) override;
void terminate(const grpc::Status &status) override;
void OnDone() override;
- std::shared_ptr<ReactorUtility> getUtility() override;
+ std::shared_ptr<ReactorStatusHolder> getUtility() override;
virtual std::unique_ptr<grpc::Status> readRequest(Request request) = 0;
};
@@ -99,7 +99,7 @@
}
template <class Request, class Response>
-std::shared_ptr<ReactorUtility>
+std::shared_ptr<ReactorStatusHolder>
ServerReadReactorBase<Request, Response>::getUtility() {
return this->utility;
}
diff --git a/services/backup/src/Reactors/server/base-reactors/ServerWriteReactorBase.h b/services/backup/src/Reactors/server/base-reactors/ServerWriteReactorBase.h
--- a/services/backup/src/Reactors/server/base-reactors/ServerWriteReactorBase.h
+++ b/services/backup/src/Reactors/server/base-reactors/ServerWriteReactorBase.h
@@ -16,7 +16,7 @@
template <class Request, class Response>
class ServerWriteReactorBase : public grpc::ServerWriteReactor<Response>,
public BaseReactor {
- std::shared_ptr<ReactorUtility> utility;
+ std::shared_ptr<ReactorStatusHolder> utility;
Response response;
bool initialized = false;
@@ -39,7 +39,7 @@
void OnWriteDone(bool ok) override;
void terminate(const grpc::Status &status);
void OnDone() override;
- std::shared_ptr<ReactorUtility> getUtility() override;
+ std::shared_ptr<ReactorStatusHolder> getUtility() override;
virtual std::unique_ptr<grpc::Status> writeResponse(Response *response) = 0;
};
@@ -112,7 +112,7 @@
}
template <class Request, class Response>
-std::shared_ptr<ReactorUtility>
+std::shared_ptr<ReactorStatusHolder>
ServerWriteReactorBase<Request, Response>::getUtility() {
return this->utility;
}
diff --git a/services/blob/src/Reactors/BaseReactor.h b/services/blob/src/Reactors/BaseReactor.h
--- a/services/blob/src/Reactors/BaseReactor.h
+++ b/services/blob/src/Reactors/BaseReactor.h
@@ -1,6 +1,6 @@
#pragma once
-#include "ReactorUtility.h"
+#include "ReactorStatusHolder.h"
#include <grpcpp/grpcpp.h>
@@ -12,7 +12,7 @@
class BaseReactor {
public:
- virtual std::shared_ptr<ReactorUtility> getUtility() = 0;
+ virtual std::shared_ptr<ReactorStatusHolder> getUtility() = 0;
virtual void terminate(const grpc::Status &status) = 0;
virtual void validate() = 0;
virtual void doneCallback() = 0;
diff --git a/services/blob/src/Reactors/ReactorUtility.h b/services/blob/src/Reactors/ReactorStatusHolder.h
rename from services/blob/src/Reactors/ReactorUtility.h
rename to services/blob/src/Reactors/ReactorStatusHolder.h
--- a/services/blob/src/Reactors/ReactorUtility.h
+++ b/services/blob/src/Reactors/ReactorStatusHolder.h
@@ -16,7 +16,7 @@
DONE = 3,
};
-class ReactorUtility {
+class ReactorStatusHolder {
private:
grpc::Status status = grpc::Status::OK;
std::mutex statusAccessMutex;
diff --git a/services/blob/src/Reactors/server/base-reactors/ServerBidiReactorBase.h b/services/blob/src/Reactors/server/base-reactors/ServerBidiReactorBase.h
--- a/services/blob/src/Reactors/server/base-reactors/ServerBidiReactorBase.h
+++ b/services/blob/src/Reactors/server/base-reactors/ServerBidiReactorBase.h
@@ -26,7 +26,7 @@
template <class Request, class Response>
class ServerBidiReactorBase : public grpc::ServerBidiReactor<Request, Response>,
public BaseReactor {
- std::shared_ptr<ReactorUtility> utility;
+ std::shared_ptr<ReactorStatusHolder> utility;
Request request;
Response response;
@@ -45,7 +45,7 @@
void OnDone() override;
void OnReadDone(bool ok) override;
void OnWriteDone(bool ok) override;
- std::shared_ptr<ReactorUtility> getUtility() override;
+ std::shared_ptr<ReactorStatusHolder> getUtility() override;
void terminate(ServerBidiReactorStatus status);
ServerBidiReactorStatus getStatus() const;
@@ -147,7 +147,7 @@
}
template <class Request, class Response>
-std::shared_ptr<ReactorUtility>
+std::shared_ptr<ReactorStatusHolder>
ServerBidiReactorBase<Request, Response>::getUtility() {
return this->utility;
}
diff --git a/services/blob/src/Reactors/server/base-reactors/ServerReadReactorBase.h b/services/blob/src/Reactors/server/base-reactors/ServerReadReactorBase.h
--- a/services/blob/src/Reactors/server/base-reactors/ServerReadReactorBase.h
+++ b/services/blob/src/Reactors/server/base-reactors/ServerReadReactorBase.h
@@ -16,7 +16,7 @@
template <class Request, class Response>
class ServerReadReactorBase : public grpc::ServerReadReactor<Request>,
public BaseReactor {
- std::shared_ptr<ReactorUtility> utility;
+ std::shared_ptr<ReactorStatusHolder> utility;
Request request;
protected:
@@ -32,7 +32,7 @@
void OnReadDone(bool ok) override;
void terminate(const grpc::Status &status) override;
void OnDone() override;
- std::shared_ptr<ReactorUtility> getUtility() override;
+ std::shared_ptr<ReactorStatusHolder> getUtility() override;
virtual std::unique_ptr<grpc::Status> readRequest(Request request) = 0;
};
@@ -99,7 +99,7 @@
}
template <class Request, class Response>
-std::shared_ptr<ReactorUtility>
+std::shared_ptr<ReactorStatusHolder>
ServerReadReactorBase<Request, Response>::getUtility() {
return this->utility;
}
diff --git a/services/blob/src/Reactors/server/base-reactors/ServerWriteReactorBase.h b/services/blob/src/Reactors/server/base-reactors/ServerWriteReactorBase.h
--- a/services/blob/src/Reactors/server/base-reactors/ServerWriteReactorBase.h
+++ b/services/blob/src/Reactors/server/base-reactors/ServerWriteReactorBase.h
@@ -16,7 +16,7 @@
template <class Request, class Response>
class ServerWriteReactorBase : public grpc::ServerWriteReactor<Response>,
public BaseReactor {
- std::shared_ptr<ReactorUtility> utility;
+ std::shared_ptr<ReactorStatusHolder> utility;
Response response;
bool initialized = false;
@@ -39,7 +39,7 @@
void OnWriteDone(bool ok) override;
void terminate(const grpc::Status &status);
void OnDone() override;
- std::shared_ptr<ReactorUtility> getUtility() override;
+ std::shared_ptr<ReactorStatusHolder> getUtility() override;
virtual std::unique_ptr<grpc::Status> writeResponse(Response *response) = 0;
};
@@ -112,7 +112,7 @@
}
template <class Request, class Response>
-std::shared_ptr<ReactorUtility>
+std::shared_ptr<ReactorStatusHolder>
ServerWriteReactorBase<Request, Response>::getUtility() {
return this->utility;
}
diff --git a/services/backup/src/Reactors/BaseReactor.h b/services/lib/lib_src/BaseReactor.h
copy from services/backup/src/Reactors/BaseReactor.h
copy to services/lib/lib_src/BaseReactor.h
--- a/services/backup/src/Reactors/BaseReactor.h
+++ b/services/lib/lib_src/BaseReactor.h
@@ -1,6 +1,6 @@
#pragma once
-#include "ReactorUtility.h"
+#include "ReactorStatusHolder.h"
#include <grpcpp/grpcpp.h>
@@ -12,7 +12,7 @@
class BaseReactor {
public:
- virtual std::shared_ptr<ReactorUtility> getUtility() = 0;
+ virtual std::shared_ptr<ReactorStatusHolder> getUtility() = 0;
virtual void terminate(const grpc::Status &status) = 0;
virtual void validate() = 0;
virtual void doneCallback() = 0;

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 10:26 PM (19 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2577258
Default Alt Text
D3931.id12283.diff (13 KB)

Event Timeline