| Apache Ignite C++

cache_entry_processor.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_CACHE_CACHE_ENTRY_PROCESSOR
24 #define _IGNITE_CACHE_CACHE_ENTRY_PROCESSOR
25
26 #include <ignite/common/common.h>
27 #include <ignite/impl/binary/binary_reader_impl.h>
28 #include <ignite/impl/binary/binary_writer_impl.h>
29 #include <ignite/impl/cache/cache_entry_processor_holder.h>
30
31 namespace ignite
32 {
33 class IgniteBinding;
34
35 namespace cache
36 {
50 template<typename K, typename V, typename R, typename A>
51 class CacheEntryProcessor
52 {
53 friend class ignite::IgniteBinding;
54
55 typedef A ArgumentType;
56 typedef K KeyType;
57 typedef V ValueType;
58 typedef R ReturnType;
59
60 public:
64 virtual ~CacheEntryProcessor()
65 {
66 // No-op.
67 }
68
76 virtual R Process(MutableCacheEntry<K, V>& entry, const A& arg) = 0;
77 };
78 }
79 }
80
81 #endif //_IGNITE_CACHE_CACHE_ENTRY_PROCESSOR
ignite::IgniteBinding
Ignite Binding.
Definition: ignite_binding.h:38
ignite
Apache Ignite API.
Definition: cache.h:48
ignite::cache::CacheEntryProcessor
Cache entry processor class template.
Definition: cache_entry_processor.h:51
ignite::cache::MutableCacheEntry
Mutable representation of CacheEntry class template.
Definition: mutable_cache_entry.h:40
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:64