| Apache Ignite C++

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