MCPcopy Create free account
hub / github.com/apache/thrift / ChildHandler

Class ChildHandler

lib/cpp/test/processor/Handlers.h:147–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145#endif
146
147class ChildHandler : public ParentHandler, virtual public ChildServiceIf {
148public:
149 ChildHandler(const std::shared_ptr<EventLog>& log) : ParentHandler(log), value_(0) {}
150
151 int32_t setValue(const int32_t value) override {
152 concurrency::Guard g(mutex_);
153 log_->append(EventLog::ET_CALL_SET_VALUE, 0, 0);
154
155 int32_t oldValue = value_;
156 value_ = value;
157 return oldValue;
158 }
159
160 int32_t getValue() override {
161 concurrency::Guard g(mutex_);
162 log_->append(EventLog::ET_CALL_GET_VALUE, 0, 0);
163
164 return value_;
165 }
166
167protected:
168 int32_t value_;
169};
170
171#ifdef _MSC_VER
172 #pragma warning( pop )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected