VMware Tanzu GemFire Native C++ Reference  10.1.5
AttributesMutator.hpp
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 
18 #pragma once
19 
20 #ifndef GEODE_ATTRIBUTESMUTATOR_H_
21 #define GEODE_ATTRIBUTESMUTATOR_H_
22 
23 #include <chrono>
24 #include <iosfwd>
25 #include <memory>
26 #include <string>
27 
28 #include "ExpirationAction.hpp"
29 #include "internal/geode_globals.hpp"
30 
35 namespace apache {
36 namespace geode {
37 namespace client {
38 
39 class CacheListener;
40 class CacheLoader;
41 class CacheWriter;
42 class Region;
43 
61 class APACHE_GEODE_EXPORT AttributesMutator {
62  private:
63  std::shared_ptr<Region> m_region;
64 
65  public:
68  explicit AttributesMutator(const std::shared_ptr<Region>& region);
69 
70  virtual ~AttributesMutator();
71 
79  std::chrono::seconds setEntryIdleTimeout(std::chrono::seconds idleTimeout);
80 
87 
95  std::chrono::seconds setEntryTimeToLive(std::chrono::seconds timeToLive);
96 
103 
111  std::chrono::seconds setRegionIdleTimeout(std::chrono::seconds idleTimeout);
112 
118 
126  std::chrono::seconds setRegionTimeToLive(std::chrono::seconds timeToLive);
127 
133 
140  uint32_t setLruEntriesLimit(uint32_t entriesLimit);
141 
147  void setCacheListener(const std::shared_ptr<CacheListener>& aListener);
148 
157  void setCacheListener(const std::string& libpath,
158  const std::string& factoryFuncName);
159 
165  void setCacheLoader(const std::shared_ptr<CacheLoader>& aLoader);
166 
174  void setCacheLoader(const std::string& libpath,
175  const std::string& factoryFuncName);
176 
182  void setCacheWriter(const std::shared_ptr<CacheWriter>& aWriter);
183 
191  void setCacheWriter(const std::string& libpath,
192  const std::string& factoryFuncName);
193 };
194 
195 } // namespace client
196 } // namespace geode
197 } // namespace apache
198 
199 #endif // GEODE_ATTRIBUTESMUTATOR_H_
apache::geode::client::AttributesMutator::setCacheLoader
void setCacheLoader(const std::shared_ptr< CacheLoader > &aLoader)
Sets cache loader for region.
apache::geode::client::AttributesMutator::setEntryTimeToLiveAction
ExpirationAction setEntryTimeToLiveAction(ExpirationAction action)
Set the timeToLive Action for region entries.
apache::geode::client::AttributesMutator::setEntryIdleTimeoutAction
ExpirationAction setEntryIdleTimeoutAction(ExpirationAction action)
Set the idleTimeout Action for region entries.
ExpirationAction
Enumerated type for expiration actions.
apache::geode::client::AttributesMutator::setRegionIdleTimeoutAction
ExpirationAction setRegionIdleTimeoutAction(ExpirationAction action)
Set the idleTimeout Action for the region itself.
apache::geode::client::AttributesMutator
Supports modification of certain region attributes after the region has been created.
Definition: AttributesMutator.hpp:61
apache::geode::client::AttributesMutator::setCacheListener
void setCacheListener(const std::string &libpath, const std::string &factoryFuncName)
Sets cache listener for region.
apache::geode::client::AttributesMutator::setRegionTimeToLiveAction
ExpirationAction setRegionTimeToLiveAction(ExpirationAction action)
Set the timeToLive Action for the region itself.
apache::geode::client::AttributesMutator::AttributesMutator
AttributesMutator(const std::shared_ptr< Region > &region)
Internal constructor.
ExpirationAction.hpp
apache::geode::client::AttributesMutator::setRegionTimeToLive
std::chrono::seconds setRegionTimeToLive(std::chrono::seconds timeToLive)
Sets the timeToLive duration for the region itself.
apache::geode::client::AttributesMutator::setLruEntriesLimit
uint32_t setLruEntriesLimit(uint32_t entriesLimit)
Sets the Maximum entry count in the region before LRU eviction.
apache::geode::client::AttributesMutator::setCacheLoader
void setCacheLoader(const std::string &libpath, const std::string &factoryFuncName)
Sets cache loader for region.
apache::geode::client::AttributesMutator::setCacheWriter
void setCacheWriter(const std::string &libpath, const std::string &factoryFuncName)
Sets cache writer for region.
apache::geode::client::AttributesMutator::setCacheWriter
void setCacheWriter(const std::shared_ptr< CacheWriter > &aWriter)
Sets cache writer for region.
apache::geode::client::AttributesMutator::setRegionIdleTimeout
std::chrono::seconds setRegionIdleTimeout(std::chrono::seconds idleTimeout)
Sets the idleTimeout duration for the region itself.
apache::geode::client::AttributesMutator::setCacheListener
void setCacheListener(const std::shared_ptr< CacheListener > &aListener)
Sets cache listener for region.
apache::geode::client::AttributesMutator::setEntryIdleTimeout
std::chrono::seconds setEntryIdleTimeout(std::chrono::seconds idleTimeout)
Sets the idleTimeout duration for region entries.
apache::geode::client::AttributesMutator::setEntryTimeToLive
std::chrono::seconds setEntryTimeToLive(std::chrono::seconds timeToLive)
Sets the timeToLive duration for region entries.

Apache Geode C++ Cache API Documentation