GridGain C++
thin-client/include/ignite/thin/cache/query/query_scan.h
Go to the documentation of this file.
1 /*
2  * Copyright 2022 GridGain Systems, Inc. and Contributors.
3  *
4  * Licensed under the GridGain Community Edition License (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * https://www.gridgain.com/products/software/community-edition/gridgain-community-edition-license
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
22 #ifndef _IGNITE_THIN_CACHE_QUERY_QUERY_SCAN
23 #define _IGNITE_THIN_CACHE_QUERY_QUERY_SCAN
24 
25 #include <stdint.h>
26 #include <string>
27 #include <vector>
28 
29 #include <ignite/impl/thin/copyable_writable.h>
30 
31 namespace ignite
32 {
33  namespace impl
34  {
35  namespace thin
36  {
37  // Forward declaration
38  class ScanQueryRequest;
39  }
40  }
41 
42  namespace thin
43  {
44  namespace cache
45  {
46  namespace query
47  {
51  class ScanQuery
52  {
53  public:
54  friend class ScanQueryRequest;
55 
59  ScanQuery() : part(-1), pageSize(1024), loc(false)
60  {
61  // No-op.
62  }
63 
69  int32_t GetPartition() const
70  {
71  return part;
72  }
73 
79  void SetPartition(int32_t partition)
80  {
81  this->part = partition;
82  }
83 
89  int32_t GetPageSize() const
90  {
91  return pageSize;
92  }
93 
99  void SetPageSize(int32_t resultPageSize)
100  {
101  this->pageSize = resultPageSize;
102  }
103 
111  bool IsLocal() const
112  {
113  return loc;
114  }
115 
123  void SetLocal(bool localScan)
124  {
125  loc = localScan;
126  }
127 
128  private:
130  int32_t part;
131 
133  int32_t pageSize;
134 
136  bool loc;
137  };
138  }
139  }
140  }
141 }
142 
143 #endif //_IGNITE_THIN_CACHE_QUERY_QUERY_SCAN
ignite
Ignite API.
Definition: cache.h:47
ignite::thin::cache::query::ScanQuery::GetPartition
int32_t GetPartition() const
Get partition to scan.
Definition: thin-client/include/ignite/thin/cache/query/query_scan.h:69
ignite::thin::cache::query::ScanQuery::SetLocal
void SetLocal(bool localScan)
Set local flag.
Definition: thin-client/include/ignite/thin/cache/query/query_scan.h:123
ignite::thin::cache::query::ScanQuery
Scan query.
Definition: thin-client/include/ignite/thin/cache/query/query_scan.h:51
ignite::thin::cache::query::ScanQuery::ScanQuery
ScanQuery()
Default constructor.
Definition: thin-client/include/ignite/thin/cache/query/query_scan.h:59
ignite::thin::cache::query::ScanQuery::SetPartition
void SetPartition(int32_t partition)
Set partition to scan.
Definition: thin-client/include/ignite/thin/cache/query/query_scan.h:79
ignite::thin::cache::query::ScanQuery::GetPageSize
int32_t GetPageSize() const
Get page size.
Definition: thin-client/include/ignite/thin/cache/query/query_scan.h:89
ignite::thin::cache::query::ScanQuery::SetPageSize
void SetPageSize(int32_t resultPageSize)
Set the size of the result page.
Definition: thin-client/include/ignite/thin/cache/query/query_scan.h:99
ignite::thin::cache::query::ScanQuery::IsLocal
bool IsLocal() const
Get local flag.
Definition: thin-client/include/ignite/thin/cache/query/query_scan.h:111