/Users/deen/code/yugabyte-db/src/yb/tablet/write_query_context.h
Line | Count | Source |
1 | | // Copyright (c) YugaByte, Inc. |
2 | | // |
3 | | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except |
4 | | // in compliance with the License. You may obtain a copy of the License at |
5 | | // |
6 | | // http://www.apache.org/licenses/LICENSE-2.0 |
7 | | // |
8 | | // Unless required by applicable law or agreed to in writing, software distributed under the License |
9 | | // is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
10 | | // or implied. See the License for the specific language governing permissions and limitations |
11 | | // under the License. |
12 | | // |
13 | | |
14 | | #ifndef YB_TABLET_WRITE_QUERY_CONTEXT_H |
15 | | #define YB_TABLET_WRITE_QUERY_CONTEXT_H |
16 | | |
17 | | #include "yb/common/hybrid_time.h" |
18 | | |
19 | | #include "yb/tablet/tablet_fwd.h" |
20 | | |
21 | | namespace yb { |
22 | | namespace tablet { |
23 | | |
24 | | class WriteQueryContext { |
25 | | public: |
26 | | // When operation completes, its callback is executed. |
27 | | virtual void Submit(std::unique_ptr<Operation> operation, int64_t term) = 0; |
28 | | virtual Result<HybridTime> ReportReadRestart() = 0; |
29 | | |
30 | 74.3k | virtual ~WriteQueryContext() {} |
31 | | }; |
32 | | |
33 | | } // namespace tablet |
34 | | } // namespace yb |
35 | | |
36 | | #endif // YB_TABLET_WRITE_QUERY_CONTEXT_H |