GridGain C++
cache_entry_processor.h
Go to the documentation of this file.
1 /*
2  * Copyright 2019 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_CACHE_CACHE_ENTRY_PROCESSOR
23 #define _IGNITE_CACHE_CACHE_ENTRY_PROCESSOR
24 
25 #include <ignite/common/common.h>
26 #include <ignite/impl/binary/binary_reader_impl.h>
27 #include <ignite/impl/binary/binary_writer_impl.h>
28 #include <ignite/impl/cache/cache_entry_processor_holder.h>
29 
30 namespace ignite
31 {
32  class IgniteBinding;
33 
34  namespace cache
35  {
49  template<typename K, typename V, typename R, typename A>
51  {
52  friend class ignite::IgniteBinding;
53 
54  typedef A ArgumentType;
55  typedef K KeyType;
56  typedef V ValueType;
57  typedef R ReturnType;
58 
59  public:
64  {
65  // No-op.
66  }
67 
75  virtual R Process(MutableCacheEntry<K, V>& entry, const A& arg) = 0;
76  };
77  }
78 }
79 
80 #endif //_IGNITE_CACHE_CACHE_ENTRY_PROCESSOR
ignite::IgniteBinding
Ignite Binding.
Definition: ignite_binding.h:37
ignite
Ignite API.
Definition: cache.h:47
ignite::cache::CacheEntryProcessor
Cache entry processor class template.
Definition: cache_entry_processor.h:50
ignite::cache::MutableCacheEntry
Mutable representation of CacheEntry class template.
Definition: mutable_cache_entry.h:39
ignite::cache::CacheEntryProcessor::Process
virtual R Process(MutableCacheEntry< K, V > &entry, const A &arg)=0
Process entry, using input argument and return result.
ignite::cache::CacheEntryProcessor::~CacheEntryProcessor
virtual ~CacheEntryProcessor()
Destructor.
Definition: cache_entry_processor.h:63