| Apache Ignite C++

core/include/ignite/cache/event/java_cache_entry_event_filter.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_EVENT_JAVA_CACHE_ENTRY_EVENT_FILTER
24 #define _IGNITE_CACHE_EVENT_JAVA_CACHE_ENTRY_EVENT_FILTER
25
26 #include <ignite/cache/event/cache_entry_event.h>
27
28 #include <ignite/impl/platform_java_object_factory_proxy.h>
29 #include <ignite/impl/writable_object.h>
30 #include <ignite/impl/cache/event/cache_entry_event_filter_base.h>
31
32 namespace ignite
33 {
34 namespace impl
35 {
36 namespace cache
37 {
38 namespace event
39 {
40 class JavaCacheEntryEventFilterHolder;
41 }
42 }
43 }
44
45 namespace cache
46 {
47 namespace event
48 {
55 class JavaCacheEntryEventFilter
56 {
57 friend class ignite::impl::cache::event::JavaCacheEntryEventFilterHolder;
58 public:
62 JavaCacheEntryEventFilter()
63 {
64 // No-op.
65 }
66
72 JavaCacheEntryEventFilter(const std::string& factoryClassName) :
73 factory(new impl::PlatformJavaObjectFactoryProxy(impl::FactoryType::USER, factoryClassName))
74 {
75 // No-op.
76 }
77
81 virtual ~JavaCacheEntryEventFilter()
82 {
83 // No-op.
84 }
85
91 const std::string& GetFactoryClassName() const
92 {
93 return factory.Get()->GetFactoryClassName();
94 }
95
105 template<typename T>
106 void SetProperty(const std::string& name, const T& value)
107 {
108 factory.Get()->template SetProperty<T>(name, value);
109 }
110
115 void ClearProperties()
116 {
117 factory.Get()->ClearProperties();
118 }
119
120 private:
122 impl::SP_PlatformJavaObjectFactoryProxy factory;
123 };
124 }
125 }
126 }
127
128 #endif //_IGNITE_CACHE_EVENT_JAVA_CACHE_ENTRY_EVENT_FILTER
ignite
Apache Ignite API.
Definition: cache.h:48
ignite::cache::event::JavaCacheEntryEventFilter::JavaCacheEntryEventFilter
JavaCacheEntryEventFilter()
Default constructor.
Definition: core/include/ignite/cache/event/java_cache_entry_event_filter.h:62
ignite::cache::event::JavaCacheEntryEventFilter
Java cache entry event filter.
Definition: core/include/ignite/cache/event/java_cache_entry_event_filter.h:55
ignite::cache::event::JavaCacheEntryEventFilter::SetProperty
void SetProperty(const std::string &name, const T &value)
Add property.
Definition: core/include/ignite/cache/event/java_cache_entry_event_filter.h:106
cache_entry_event.h
ignite::cache::event::JavaCacheEntryEventFilter::ClearProperties
void ClearProperties()
Clear set properties.
Definition: core/include/ignite/cache/event/java_cache_entry_event_filter.h:115
ignite::cache::event::JavaCacheEntryEventFilter::JavaCacheEntryEventFilter
JavaCacheEntryEventFilter(const std::string &factoryClassName)
Constructor.
Definition: core/include/ignite/cache/event/java_cache_entry_event_filter.h:72
ignite::cache::event::JavaCacheEntryEventFilter::GetFactoryClassName
const std::string & GetFactoryClassName() const
Get Java remote filter factory class name.
Definition: core/include/ignite/cache/event/java_cache_entry_event_filter.h:91
ignite::cache::event::JavaCacheEntryEventFilter::~JavaCacheEntryEventFilter
virtual ~JavaCacheEntryEventFilter()
Destructor.
Definition: core/include/ignite/cache/event/java_cache_entry_event_filter.h:81