 |
GridGain C++
|
Go to the documentation of this file.
22 #ifndef _IGNITE_COMPUTE_COMPUTE
23 #define _IGNITE_COMPUTE_COMPUTE
25 #include <ignite/common/common.h>
31 #include <ignite/impl/compute/compute_impl.h>
83 Compute(common::concurrent::SharedPointer<impl::compute::ComputeImpl> impl) :
105 template<
typename R,
typename K,
typename F>
106 R
AffinityCall(
const std::string& cacheName,
const K& key,
const F& func)
108 return impl.Get()->AffinityCallAsync<R, K, F>(cacheName, key, func).GetValue();
128 template<
typename R,
typename K,
typename F>
131 return impl.Get()->AffinityCallAsync<R, K, F>(cacheName, key, func);
146 template<
typename K,
typename F>
147 void AffinityRun(
const std::string& cacheName,
const K& key,
const F& action)
149 return impl.Get()->AffinityRunAsync<K, F>(cacheName, key, action).GetValue();
166 template<
typename K,
typename F>
169 return impl.Get()->AffinityRunAsync<K, F>(cacheName, key, action);
185 template<
typename R,
typename F>
188 return impl.Get()->CallAsync<R, F>(func).GetValue();
205 template<
typename R,
typename F>
208 return impl.Get()->CallAsync<R, F>(func);
223 return impl.Get()->RunAsync<F>(action).GetValue();
239 return impl.Get()->RunAsync<F>(action);
253 template<
typename R,
typename F>
256 return impl.Get()->BroadcastAsync<R, F>(func).GetValue();
270 impl.Get()->BroadcastAsync<F,
false>(func).GetValue();
286 template<
typename R,
typename F>
289 return impl.Get()->BroadcastAsync<R, F>(func);
305 return impl.Get()->BroadcastAsync<F,
false>(func);
319 template<
typename R,
typename A>
322 return impl.Get()->ExecuteJavaTask<R, A>(taskName, taskArg);
337 return impl.Get()->ExecuteJavaTask<R>(taskName);
351 template<
typename R,
typename A>
354 return impl.Get()->ExecuteJavaTaskAsync<R, A>(taskName, taskArg);
369 return impl.Get()->ExecuteJavaTaskAsync<R>(taskName);
374 common::concurrent::SharedPointer<impl::compute::ComputeImpl> impl;
379 #endif //_IGNITE_COMPUTE_COMPUTE
Defines compute grid functionality for executing tasks and closures over nodes in the ClusterGroup.
Definition: compute.h:73
Ignite API.
Definition: cache.h:47
std::vector< R > Broadcast(const F &func)
Broadcasts provided ComputeFunc to all nodes in the cluster group.
Definition: compute.h:254
Future< void > RunAsync(const F &action)
Asyncronuously runs provided ComputeFunc on a node within the underlying cluster group.
Definition: compute.h:237
Future< R > CallAsync(const F &func)
Asyncronuously calls provided ComputeFunc on a node within the underlying cluster group.
Definition: compute.h:206
Future class template.
Definition: future.h:51
Future< R > ExecuteJavaTaskAsync(const std::string &taskName)
Asynchronously executes given Java task on the grid projection.
Definition: compute.h:367
Future< std::vector< R > > BroadcastAsync(const F &func)
Asyncronuously broadcasts provided ComputeFunc to all nodes in the cluster group.
Definition: compute.h:287
void Broadcast(const F &func)
Broadcasts provided ComputeFunc to all nodes in the cluster group.
Definition: compute.h:268
Specialization for void type.
Definition: future.h:172
void Run(const F &action)
Runs provided ComputeFunc on a node within the underlying cluster group.
Definition: compute.h:221
Future< void > AffinityRunAsync(const std::string &cacheName, const K &key, const F &action)
Executes given job asynchronously on the node where data for provided affinity key is located (a....
Definition: compute.h:167
Compute(common::concurrent::SharedPointer< impl::compute::ComputeImpl > impl)
Constructor.
Definition: compute.h:83
Future< R > ExecuteJavaTaskAsync(const std::string &taskName, const A &taskArg)
Asynchronously executes given Java task on the grid projection.
Definition: compute.h:352
Future< R > AffinityCallAsync(const std::string &cacheName, const K &key, const F &func)
Executes given job asynchronously on the node where data for provided affinity key is located (a....
Definition: compute.h:129
R AffinityCall(const std::string &cacheName, const K &key, const F &func)
Executes given job on the node where data for provided affinity key is located (a....
Definition: compute.h:106
R ExecuteJavaTask(const std::string &taskName, const A &taskArg)
Executes given Java task on the grid projection.
Definition: compute.h:320
R ExecuteJavaTask(const std::string &taskName)
Executes given Java task on the grid projection.
Definition: compute.h:335
Future< void > BroadcastAsync(const F &func)
Asyncronuously broadcasts provided ComputeFunc to all nodes in the cluster group.
Definition: compute.h:303
void AffinityRun(const std::string &cacheName, const K &key, const F &action)
Executes given job on the node where data for provided affinity key is located (a....
Definition: compute.h:147
R Call(const F &func)
Calls provided ComputeFunc on a node within the underlying cluster group.
Definition: compute.h:186