GridGain C++
core/include/ignite/cache/event/java_cache_entry_event_filter.h
Go to the documentation of this file.
1 /*
2  * Copyright 2022 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_EVENT_JAVA_CACHE_ENTRY_EVENT_FILTER
23 #define _IGNITE_CACHE_EVENT_JAVA_CACHE_ENTRY_EVENT_FILTER
24 
26 
27 #include <ignite/impl/platform_java_object_factory_proxy.h>
28 #include <ignite/impl/writable_object.h>
29 #include <ignite/impl/cache/event/cache_entry_event_filter_base.h>
30 
31 namespace ignite
32 {
33  namespace impl
34  {
35  namespace cache
36  {
37  namespace event
38  {
39  class JavaCacheEntryEventFilterHolder;
40  }
41  }
42  }
43 
44  namespace cache
45  {
46  namespace event
47  {
55  {
56  friend class ignite::impl::cache::event::JavaCacheEntryEventFilterHolder;
57  public:
62  {
63  // No-op.
64  }
65 
71  JavaCacheEntryEventFilter(const std::string& factoryClassName) :
72  factory(new impl::PlatformJavaObjectFactoryProxy(impl::FactoryType::USER, factoryClassName))
73  {
74  // No-op.
75  }
76 
81  {
82  // No-op.
83  }
84 
90  const std::string& GetFactoryClassName() const
91  {
92  return factory.Get()->GetFactoryClassName();
93  }
94 
104  template<typename T>
105  void SetProperty(const std::string& name, const T& value)
106  {
107  factory.Get()->template SetProperty<T>(name, value);
108  }
109 
115  {
116  factory.Get()->ClearProperties();
117  }
118 
119  private:
121  impl::SP_PlatformJavaObjectFactoryProxy factory;
122  };
123  }
124  }
125 }
126 
127 #endif //_IGNITE_CACHE_EVENT_JAVA_CACHE_ENTRY_EVENT_FILTER
ignite
Ignite API.
Definition: cache.h:47
ignite::cache::event::JavaCacheEntryEventFilter::JavaCacheEntryEventFilter
JavaCacheEntryEventFilter()
Default constructor.
Definition: core/include/ignite/cache/event/java_cache_entry_event_filter.h:61
ignite::cache::event::JavaCacheEntryEventFilter
Java cache entry event filter.
Definition: core/include/ignite/cache/event/java_cache_entry_event_filter.h:54
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:105
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:114
ignite::cache::event::JavaCacheEntryEventFilter::JavaCacheEntryEventFilter
JavaCacheEntryEventFilter(const std::string &factoryClassName)
Constructor.
Definition: core/include/ignite/cache/event/java_cache_entry_event_filter.h:71
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:90
ignite::cache::event::JavaCacheEntryEventFilter::~JavaCacheEntryEventFilter
virtual ~JavaCacheEntryEventFilter()
Destructor.
Definition: core/include/ignite/cache/event/java_cache_entry_event_filter.h:80