3 #ifndef GEODE_FUNCTIONSERVICE_H_
4 #define GEODE_FUNCTIONSERVICE_H_
28 #include "geode_globals.hpp"
37 #define GF_TYPE_IS_POOL(T) \
38 apache::geode::client::TypeHelper::SuperSubclass< \
39 apache::geode::client::Pool, T>::result
40 #define GF_TYPE_IS_POOL_TYPE(T) \
41 apache::geode::client::TypeHelper::YesNoType<GF_TYPE_IS_POOL(T)>::value
88 return onServerWithPool(pool);
106 return onServerWithCache(cache);
109 template <
typename T>
111 return onServer(poolOrCache, GF_TYPE_IS_POOL_TYPE(T));
128 return onServersWithPool(pool);
146 return onServersWithCache(cache);
149 template <
typename T>
151 return onServers(poolOrCache, GF_TYPE_IS_POOL_TYPE(T));
154 virtual ~FunctionService() {}
157 static ExecutionPtr onServerWithPool(
const PoolPtr& pool);
159 static ExecutionPtr onServerWithCache(
const RegionServicePtr& cache);
161 static ExecutionPtr onServersWithPool(
const PoolPtr& pool);
163 static ExecutionPtr onServersWithCache(
const RegionServicePtr& cache);
165 template <
typename T>
166 static ExecutionPtr onServer(
const SharedPtr<T>& pool,
167 TypeHelper::yes_type isPool) {
168 return onServerWithPool(pool);
171 template <
typename T>
172 static ExecutionPtr onServer(
const SharedPtr<T>& cache,
173 TypeHelper::no_type isPool) {
174 return onServerWithCache(cache);
177 template <
typename T>
178 static ExecutionPtr onServers(
const SharedPtr<T>& pool,
179 TypeHelper::yes_type isPool) {
180 return onServersWithPool(pool);
183 template <
typename T>
184 static ExecutionPtr onServers(
const SharedPtr<T>& cache,
185 TypeHelper::no_type isPool) {
186 return onServersWithCache(cache);
193 #endif // GEODE_FUNCTIONSERVICE_H_