 |
GridGain C++
|
Go to the documentation of this file.
22 #ifndef _IGNITE_CACHE_QUERY_QUERY_CURSOR
23 #define _IGNITE_CACHE_QUERY_QUERY_CURSOR
27 #include <ignite/common/concurrent.h>
31 #include "ignite/impl/cache/query/query_impl.h"
32 #include "ignite/impl/operations.h"
52 template<
typename K,
typename V>
74 QueryCursor(impl::cache::query::QueryCursorImpl* impl) : impl(impl)
111 impl::cache::query::QueryCursorImpl* impl0 = impl.Get();
114 return impl0->HasNext(err);
118 "Instance is not usable (did you check for error?).");
157 impl::cache::query::QueryCursorImpl* impl0 = impl.Get();
163 impl::Out2Operation<K, V> outOp(key, val);
165 impl0->GetNext(outOp, err);
172 "Instance is not usable (did you check for error?).");
207 impl::cache::query::QueryCursorImpl* impl0 = impl.Get();
210 impl::OutQueryGetAllOperation<K, V> outOp(res);
212 impl0->GetAll(outOp, err);
216 "Instance is not usable (did you check for error?).");
226 template<
typename OutIter>
229 impl::cache::query::QueryCursorImpl* impl0 = impl.Get();
232 impl::OutQueryGetAllOperationIter<K, V, OutIter> outOp(iter);
234 impl0->GetAll(outOp);
239 "Instance is not usable (did you check for error?).");
256 return impl.IsValid();
261 ignite::common::concurrent::SharedPointer<impl::cache::query::QueryCursorImpl> impl;
267 #endif //_IGNITE_CACHE_QUERY_QUERY_CURSOR
Ignite API.
Definition: cache.h:47
void GetAll(std::vector< CacheEntry< K, V > > &res)
Get all entries.
Definition: core/include/ignite/cache/query/query_cursor.h:187
bool HasNext()
Check whether next entry exists.
Definition: core/include/ignite/cache/query/query_cursor.h:88
Cache entry class template.
Definition: core/include/ignite/cache/cache_entry.h:39
Query cursor class template.
Definition: core/include/ignite/cache/query/query_cursor.h:53
QueryCursor(impl::cache::query::QueryCursorImpl *impl)
Constructor.
Definition: core/include/ignite/cache/query/query_cursor.h:74
CacheEntry< K, V > GetNext()
Get next entry.
Definition: core/include/ignite/cache/query/query_cursor.h:133
static const int IGNITE_ERR_GENERIC
Generic Ignite error.
Definition: ignite_error.h:130
void GetAll(OutIter iter)
Get all entries.
Definition: core/include/ignite/cache/query/query_cursor.h:227
bool IsValid() const
Check if the instance is valid.
Definition: core/include/ignite/cache/query/query_cursor.h:254
CacheEntry< K, V > GetNext(IgniteError &err)
Get next entry.
Definition: core/include/ignite/cache/query/query_cursor.h:155
void GetAll(std::vector< CacheEntry< K, V > > &res, IgniteError &err)
Get all entries.
Definition: core/include/ignite/cache/query/query_cursor.h:205
static void ThrowIfNeeded(const IgniteError &err)
Throw an error if code is not IGNITE_SUCCESS.
Definition: ignite_error.cpp:26
QueryCursor()
Default constructor.
Definition: core/include/ignite/cache/query/query_cursor.h:62
bool HasNext(IgniteError &err)
Check whether next entry exists.
Definition: core/include/ignite/cache/query/query_cursor.h:109
Ignite error information.
Definition: ignite_error.h:93