Apache Ignite C++
compute_func.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
23 #ifndef _IGNITE_COMPUTE_COMPUTE_FUNC
24 #define _IGNITE_COMPUTE_COMPUTE_FUNC
25 
26 namespace ignite
27 {
28  class IgniteBinding;
29 
30  namespace compute
31  {
40  template<typename R>
42  {
43  friend class ignite::IgniteBinding;
44 
45  typedef R ReturnType;
46  public:
50  virtual ~ComputeFunc()
51  {
52  // No-op.
53  }
54 
60  virtual R Call() = 0;
61  };
62  }
63 }
64 
65 #endif //_IGNITE_COMPUTE_COMPUTE_FUNC
virtual R Call()=0
Called upon execution by compute.
Ignite Binding.
Definition: ignite_binding.h:33
virtual ~ComputeFunc()
Destructor.
Definition: compute_func.h:50
Apache Ignite API.
Definition: cache.h:48
Interface for a simple compute function that can be serialized and called on the remote nodes...
Definition: compute_func.h:41