20#ifndef GEODE_REGIONFACTORY_H_
21#define GEODE_REGIONFACTORY_H_
26#include "internal/chrono/duration.hpp"
27#include "internal/geode_globals.hpp"
58 std::shared_ptr<Region>
create(std::string name);
65 const std::shared_ptr<CacheLoader>& cacheLoader);
72 const std::shared_ptr<CacheWriter>& cacheWriter);
79 const std::shared_ptr<CacheListener>& aListener);
87 const std::shared_ptr<PartitionResolver>& aResolver);
95 const std::string& factoryFuncName);
103 const std::string& factoryFuncName);
111 const std::string& factoryFuncName);
119 const std::string& factoryFuncName);
130 std::chrono::seconds idleTimeout);
139 std::chrono::seconds timeToLive);
148 std::chrono::seconds idleTimeout);
157 std::chrono::seconds timeToLive);
169 const std::string& libpath,
const std::string& factoryFuncName,
170 const std::shared_ptr<Properties>& config =
nullptr);
179 const std::shared_ptr<PersistenceManager>& persistenceManager,
180 const std::shared_ptr<Properties>& config =
nullptr);
266 RegionFactory(apache::geode::client::RegionShortcut preDefinedRegion,
267 CacheImpl* cacheImpl);
269 void setRegionShortcut();
271 RegionShortcut m_preDefinedRegion;
273 std::shared_ptr<RegionAttributesFactory> m_regionAttributesFactory;
275 CacheImpl* m_cacheImpl;
277 friend class CacheImpl;
DiskPolicyType
DiskPolicyType.hpp Enumerated type for disk policy.
Definition: DiskPolicyType.hpp:42
ExpirationAction
ExpirationAction.hpp Enumerated type for expiration actions.
Definition: ExpirationAction.hpp:42
Provides for the configuration and creation of instances of Region.
Definition: RegionFactory.hpp:43
RegionFactory & setLruEntriesLimit(const uint32_t entriesLimit)
Sets a limit on the number of entries that will be held in the cache.
RegionFactory & setCacheListener(const std::shared_ptr< CacheListener > &aListener)
Sets the CacheListener for the next RegionAttributes created.
RegionFactory & setPersistenceManager(const std::shared_ptr< PersistenceManager > &persistenceManager, const std::shared_ptr< Properties > &config=nullptr)
Sets the PersistenceManager for the next RegionAttributes created.
RegionFactory & setPersistenceManager(const std::string &libpath, const std::string &factoryFuncName, const std::shared_ptr< Properties > &config=nullptr)
Sets the library path for the library that will be invoked for the persistence of the region.
RegionFactory & setCacheListener(const std::string &libpath, const std::string &factoryFuncName)
Sets the library path for the library that will be invoked for the listener of the region.
RegionFactory & setCacheLoader(const std::shared_ptr< CacheLoader > &cacheLoader)
Sets the cache loader for the next RegionAttributes created.
RegionFactory & setConcurrencyLevel(uint8_t concurrencyLevel)
Sets the concurrency level tof the next RegionAttributes created.
RegionFactory & setEntryTimeToLive(ExpirationAction action, std::chrono::seconds timeToLive)
Sets the timeToLive expiration attributes for region entries for the next RegionAttributes created.
RegionFactory & setPartitionResolver(const std::shared_ptr< PartitionResolver > &aResolver)
Sets the PartitionResolver for the next RegionAttributes created.
RegionFactory & setRegionTimeToLive(ExpirationAction action, std::chrono::seconds timeToLive)
Sets the timeToLive expiration attributes for the region itself for the next RegionAttributes created...
RegionFactory & setCacheLoader(const std::string &libpath, const std::string &factoryFuncName)
Sets the library path for the library that will be invoked for the loader of the region.
RegionFactory & setEntryIdleTimeout(ExpirationAction action, std::chrono::seconds idleTimeout)
Sets the idleTimeout expiration attributes for region entries for the next RegionAttributes created.
RegionFactory & setConcurrencyChecksEnabled(bool enable)
Enables or disables concurrent modification checks.
RegionFactory & setPartitionResolver(const std::string &libpath, const std::string &factoryFuncName)
Sets the library path for the library that will be invoked for the partition resolver of the region.
RegionFactory & setLoadFactor(float loadFactor)
Sets the entry load factor for the next RegionAttributes created.
RegionFactory & setCachingEnabled(bool cachingEnabled)
Set caching enabled flag for this region.
RegionFactory & setCacheWriter(const std::shared_ptr< CacheWriter > &cacheWriter)
Sets the cache writer for the next RegionAttributes created.
std::shared_ptr< Region > create(std::string name)
Create a Region of the given name.
RegionFactory & setCacheWriter(const std::string &libpath, const std::string &factoryFuncName)
Sets the library path for the library that will be invoked for the writer of the region.
RegionFactory & setDiskPolicy(const DiskPolicyType diskPolicy)
Sets the Disk policy type for the next RegionAttributes created.
RegionFactory & setInitialCapacity(int initialCapacity)
Sets the entry initial capacity for the next RegionAttributes created.
RegionFactory & setRegionIdleTimeout(ExpirationAction action, std::chrono::seconds idleTimeout)
Sets the idleTimeout expiration attributes for the region itself for the next RegionAttributes create...