geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbarr...@apache.org
Subject [geode-native] branch develop updated: GEODE-4448: Refactors ExpirationAction to enum class. (#203)
Date Wed, 31 Jan 2018 21:55:59 GMT
This is an automated email from the ASF dual-hosted git repository.

jbarrett pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-native.git


The following commit(s) were added to refs/heads/develop by this push:
     new ba5fffd   GEODE-4448: Refactors ExpirationAction to enum class. (#203)
ba5fffd is described below

commit ba5fffd01f7acb29c43a410c437a762e6d9e0659
Author: Jacob Barrett <jbarrett@pivotal.io>
AuthorDate: Wed Jan 31 13:55:56 2018 -0800

     GEODE-4448: Refactors ExpirationAction to enum class. (#203)
---
 clicache/src/AttributesFactory.cpp                 |   8 +-
 clicache/src/AttributesMutator.cpp                 |   8 +-
 clicache/src/RegionFactory.cpp                     |   8 +-
 cppcache/include/geode/AttributesFactory.hpp       |   8 +-
 cppcache/include/geode/AttributesMutator.hpp       |  20 ++-
 cppcache/include/geode/ExpirationAction.hpp        |  82 ++----------
 cppcache/include/geode/ExpirationAttributes.hpp    |  12 +-
 cppcache/include/geode/RegionAttributes.hpp        |  20 +--
 cppcache/include/geode/RegionFactory.hpp           |   8 +-
 cppcache/integration-test/CacheHelper.cpp          |  18 +--
 cppcache/integration-test/CacheHelper.hpp          |  18 +--
 cppcache/integration-test/ThinClientHelper.hpp     |   2 +-
 cppcache/integration-test/testExpiration.cpp       |   2 +-
 .../testThinClientLRUExpiration.cpp                |  56 ++++----
 .../testXmlCacheCreationWithOverFlow.cpp           |   2 +-
 cppcache/src/AttributesFactory.cpp                 |   8 +-
 cppcache/src/AttributesMutator.cpp                 |  16 +--
 cppcache/src/CacheXmlParser.cpp                    |   2 +-
 cppcache/src/EntryExpiryHandler.cpp                |   2 +-
 cppcache/src/EntryExpiryHandler.hpp                |   5 +-
 cppcache/src/ExpirationAction.cpp                  |  46 -------
 cppcache/src/ExpirationAttributes.cpp              |   8 +-
 cppcache/src/LocalRegion.cpp                       |  15 +--
 cppcache/src/LocalRegion.hpp                       |  10 +-
 cppcache/src/RegionAttributes.cpp                  |  20 +--
 cppcache/src/RegionExpiryHandler.cpp               |   2 +-
 cppcache/src/RegionExpiryHandler.hpp               |   5 +-
 cppcache/src/RegionFactory.cpp                     |   8 +-
 cppcache/src/RegionInternal.cpp                    |   8 +-
 cppcache/src/RegionInternal.hpp                    |  15 +--
 cppcache/test/ExpirationActionTest.cpp             | 148 ---------------------
 tests/cpp/fwklib/FwkObjects.hpp                    |   4 +-
 tests/cpp/fwklib/RegionHelper.hpp                  |  54 +++++---
 33 files changed, 200 insertions(+), 448 deletions(-)

diff --git a/clicache/src/AttributesFactory.cpp b/clicache/src/AttributesFactory.cpp
index e9c71c7..bf74cec 100644
--- a/clicache/src/AttributesFactory.cpp
+++ b/clicache/src/AttributesFactory.cpp
@@ -230,7 +230,7 @@ namespace Apache
       {
         try
         {
-          m_nativeptr->get()->setEntryIdleTimeout(static_cast<native::ExpirationAction::Action>( action ), TimeUtils::TimeSpanToDurationCeil<std::chrono::seconds>(idleTimeout) );
+          m_nativeptr->get()->setEntryIdleTimeout(static_cast<native::ExpirationAction>( action ), TimeUtils::TimeSpanToDurationCeil<std::chrono::seconds>(idleTimeout) );
         }
         finally
         {
@@ -244,7 +244,7 @@ namespace Apache
       {
         try
         {
-          m_nativeptr->get()->setEntryTimeToLive( static_cast<native::ExpirationAction::Action>( action ), TimeUtils::TimeSpanToDurationCeil<std::chrono::seconds>(timeToLive) );
+          m_nativeptr->get()->setEntryTimeToLive( static_cast<native::ExpirationAction>( action ), TimeUtils::TimeSpanToDurationCeil<std::chrono::seconds>(timeToLive) );
         }
         finally
         {
@@ -258,7 +258,7 @@ namespace Apache
       {
         try
         {
-          m_nativeptr->get()->setRegionIdleTimeout( static_cast<native::ExpirationAction::Action>( action ), TimeUtils::TimeSpanToDurationCeil<std::chrono::seconds>(idleTimeout) );
+          m_nativeptr->get()->setRegionIdleTimeout( static_cast<native::ExpirationAction>( action ), TimeUtils::TimeSpanToDurationCeil<std::chrono::seconds>(idleTimeout) );
         }
         finally
         {
@@ -272,7 +272,7 @@ namespace Apache
       {
         try
         {
-          m_nativeptr->get()->setRegionTimeToLive( static_cast<native::ExpirationAction::Action>( action ), TimeUtils::TimeSpanToDurationCeil<std::chrono::seconds>(timeToLive) );
+          m_nativeptr->get()->setRegionTimeToLive( static_cast<native::ExpirationAction>( action ), TimeUtils::TimeSpanToDurationCeil<std::chrono::seconds>(timeToLive) );
         }
         finally
         {
diff --git a/clicache/src/AttributesMutator.cpp b/clicache/src/AttributesMutator.cpp
index 10c5200..864b624 100644
--- a/clicache/src/AttributesMutator.cpp
+++ b/clicache/src/AttributesMutator.cpp
@@ -57,7 +57,7 @@ namespace Apache
         {
           return static_cast<ExpirationAction>(
             m_nativeptr->get()->setEntryIdleTimeoutAction(
-              static_cast<native::ExpirationAction::Action>(action)));
+              static_cast<native::ExpirationAction>(action)));
         }
         finally
         {
@@ -86,7 +86,7 @@ namespace Apache
         {
           return static_cast<ExpirationAction>(
             m_nativeptr->get()->setEntryTimeToLiveAction(
-              static_cast<native::ExpirationAction::Action>(action)));
+              static_cast<native::ExpirationAction>(action)));
         }
         finally
         {
@@ -115,7 +115,7 @@ namespace Apache
         {
           return static_cast<ExpirationAction>(
             m_nativeptr->get()->setRegionIdleTimeoutAction(
-              static_cast<native::ExpirationAction::Action>(action)));
+              static_cast<native::ExpirationAction>(action)));
         }
         finally
         {
@@ -144,7 +144,7 @@ namespace Apache
         {
           return static_cast<ExpirationAction>(
             m_nativeptr->get()->setRegionTimeToLiveAction(
-              static_cast<native::ExpirationAction::Action>(action)));
+              static_cast<native::ExpirationAction>(action)));
         }
         finally
         {
diff --git a/clicache/src/RegionFactory.cpp b/clicache/src/RegionFactory.cpp
index 07a4c8b..d269f73 100644
--- a/clicache/src/RegionFactory.cpp
+++ b/clicache/src/RegionFactory.cpp
@@ -119,7 +119,7 @@ namespace Apache
       {
         try
         {
-          m_nativeptr->get()->setEntryIdleTimeout( static_cast<native::ExpirationAction::Action>( action ), TimeUtils::TimeSpanToDurationCeil<std::chrono::seconds>(idleTimeout) );
+          m_nativeptr->get()->setEntryIdleTimeout( static_cast<native::ExpirationAction>( action ), TimeUtils::TimeSpanToDurationCeil<std::chrono::seconds>(idleTimeout) );
         }
         finally
         {
@@ -132,7 +132,7 @@ namespace Apache
       {
         try
         {
-          m_nativeptr->get()->setEntryTimeToLive(static_cast<native::ExpirationAction::Action>( action ), TimeUtils::TimeSpanToDurationCeil<std::chrono::seconds>(timeToLive) );
+          m_nativeptr->get()->setEntryTimeToLive(static_cast<native::ExpirationAction>( action ), TimeUtils::TimeSpanToDurationCeil<std::chrono::seconds>(timeToLive) );
         }
         finally
         {
@@ -145,7 +145,7 @@ namespace Apache
       {
         try
         {
-          m_nativeptr->get()->setRegionIdleTimeout(static_cast<native::ExpirationAction::Action>( action ), TimeUtils::TimeSpanToDurationCeil<std::chrono::seconds>(idleTimeout) );
+          m_nativeptr->get()->setRegionIdleTimeout(static_cast<native::ExpirationAction>( action ), TimeUtils::TimeSpanToDurationCeil<std::chrono::seconds>(idleTimeout) );
         }
         finally
         {
@@ -158,7 +158,7 @@ namespace Apache
       {
         try
         {
-          m_nativeptr->get()->setRegionTimeToLive(static_cast<native::ExpirationAction::Action>( action ), TimeUtils::TimeSpanToDurationCeil<std::chrono::seconds>(timeToLive) );
+          m_nativeptr->get()->setRegionTimeToLive(static_cast<native::ExpirationAction>( action ), TimeUtils::TimeSpanToDurationCeil<std::chrono::seconds>(timeToLive) );
         }
         finally
         {
diff --git a/cppcache/include/geode/AttributesFactory.hpp b/cppcache/include/geode/AttributesFactory.hpp
index dfa716e..cad95fd 100644
--- a/cppcache/include/geode/AttributesFactory.hpp
+++ b/cppcache/include/geode/AttributesFactory.hpp
@@ -262,7 +262,7 @@ class _GEODE_EXPORT AttributesFactory {
    * @param idleTimeout the idleTimeout for entries in this region.
    * @return a reference to <code>this</code>
    */
-  AttributesFactory& setEntryIdleTimeout(ExpirationAction::Action action,
+  AttributesFactory& setEntryIdleTimeout(ExpirationAction action,
                                          std::chrono::seconds idleTimeout);
 
   /**
@@ -275,7 +275,7 @@ class _GEODE_EXPORT AttributesFactory {
    * @param timeToLive the timeToLive for entries in this region.
    * @return a reference to <code>this</code>
    */
-  AttributesFactory& setEntryTimeToLive(ExpirationAction::Action action,
+  AttributesFactory& setEntryTimeToLive(ExpirationAction action,
                                         std::chrono::seconds timeToLive);
 
   /**
@@ -288,7 +288,7 @@ class _GEODE_EXPORT AttributesFactory {
    * @param idleTimeout the idleTimeout for the region as a whole.
    * @return a reference to <code>this</code>
    */
-  AttributesFactory& setRegionIdleTimeout(ExpirationAction::Action action,
+  AttributesFactory& setRegionIdleTimeout(ExpirationAction action,
                                           std::chrono::seconds idleTimeout);
 
   /**
@@ -301,7 +301,7 @@ class _GEODE_EXPORT AttributesFactory {
    * @param timeToLive the timeToLive for the region as a whole.
    * @return a reference to <code>this</code>
    */
-  AttributesFactory& setRegionTimeToLive(ExpirationAction::Action action,
+  AttributesFactory& setRegionTimeToLive(ExpirationAction action,
                                          std::chrono::seconds timeToLive);
 
   // PERSISTENCE
diff --git a/cppcache/include/geode/AttributesMutator.hpp b/cppcache/include/geode/AttributesMutator.hpp
index de387b7..8d1fad0 100644
--- a/cppcache/include/geode/AttributesMutator.hpp
+++ b/cppcache/include/geode/AttributesMutator.hpp
@@ -79,12 +79,11 @@ class _GEODE_EXPORT AttributesMutator {
   std::chrono::seconds setEntryIdleTimeout(std::chrono::seconds idleTimeout);
 
   /** Set the idleTimeout Action for region entries.
-   * @param action the idleTimeout ExpirationAction::Action for entries in this
+   * @param action the idleTimeout ExpirationAction for entries in this
    * region.
    * @return the previous value.
    */
-  ExpirationAction::Action setEntryIdleTimeoutAction(
-      ExpirationAction::Action action);
+  ExpirationAction setEntryIdleTimeoutAction(ExpirationAction action);
 
   /** Sets the timeToLive duration for region entries.
    * @param timeToLive the timeToLive for entries in this region.
@@ -96,12 +95,11 @@ class _GEODE_EXPORT AttributesMutator {
   std::chrono::seconds setEntryTimeToLive(std::chrono::seconds timeToLive);
 
   /** Set the timeToLive Action for region entries.
-   * @param action the timeToLive ExpirationAction::Action for entries in this
+   * @param action the timeToLive ExpirationAction for entries in this
    * region.
    * @return the previous value.
    */
-  ExpirationAction::Action setEntryTimeToLiveAction(
-      ExpirationAction::Action action);
+  ExpirationAction setEntryTimeToLiveAction(ExpirationAction action);
 
   /** Sets the idleTimeout duration for the region itself.
    * @param idleTimeout the ExpirationAttributes for this region idleTimeout
@@ -113,11 +111,10 @@ class _GEODE_EXPORT AttributesMutator {
   std::chrono::seconds setRegionIdleTimeout(std::chrono::seconds idleTimeout);
 
   /** Set the idleTimeout Action for the region itself.
-   * @param action the idleTimeout ExpirationAction::Action for this region.
+   * @param action the idleTimeout ExpirationAction for this region.
    * @return the previous value.
    */
-  ExpirationAction::Action setRegionIdleTimeoutAction(
-      ExpirationAction::Action action);
+  ExpirationAction setRegionIdleTimeoutAction(ExpirationAction action);
 
   /** Sets the timeToLive duration for the region itself.
    * @param timeToLive the ExpirationAttributes for this region timeToLive
@@ -129,11 +126,10 @@ class _GEODE_EXPORT AttributesMutator {
   std::chrono::seconds setRegionTimeToLive(std::chrono::seconds timeToLive);
 
   /** Set the timeToLive Action for the region itself.
-   * @param action the timeToLive ExpirationAction::Action for this region.
+   * @param action the timeToLive ExpirationAction for this region.
    * @return the previous value.
    */
-  ExpirationAction::Action setRegionTimeToLiveAction(
-      ExpirationAction::Action action);
+  ExpirationAction setRegionTimeToLiveAction(ExpirationAction action);
 
   /** Sets the Maximum entry count in the region before LRU eviction.
    * @param entriesLimit the number of entries to allow.
diff --git a/cppcache/include/geode/ExpirationAction.hpp b/cppcache/include/geode/ExpirationAction.hpp
index 480d169..5a25b7c 100644
--- a/cppcache/include/geode/ExpirationAction.hpp
+++ b/cppcache/include/geode/ExpirationAction.hpp
@@ -39,77 +39,19 @@ namespace client {
  *
  * @see ExpirationAttributes
  */
-class _GEODE_EXPORT ExpirationAction {
- public:
-  typedef enum {
-    /** When the region or cached object expires, it is invalidated. */
-    INVALIDATE = 0,
-    /** When expired, invalidated locally only. */
-    LOCAL_INVALIDATE,
-    /** When the region or cached object expires, it is destroyed. */
-    DESTROY,
-    /** When expired, destroyed locally only. */
-    LOCAL_DESTROY,
-    /** invalid type. */
-    INVALID_ACTION
-  } Action;
-
-  /**
-  * @param name the name of the expiration action
-  */
-  static Action fromName(const std::string& name);
-
-  /**
-   * Returns whether this is the action for distributed invalidate.
-   * @return true if this in INVALIDATE
-   */
-  inline static bool isInvalidate(const Action type) {
-    return (type == INVALIDATE);
-  }
-
-  /**
-   * Returns whether this is the action for local invalidate.
-   * @return true if this is LOCAL_INVALIDATE
-   */
-  inline static bool isLocalInvalidate(const Action type) {
-    return (type == LOCAL_INVALIDATE);
-  }
-
-  /** Returns whether this is the action for distributed destroy.
-   * @return true if this is DESTROY
-   */
-  inline static bool isDestroy(const Action type) { return (type == DESTROY); }
-
-  /** Returns whether this is the action for local destroy.
-   * @return true if thisis LOCAL_DESTROY
-   */
-  inline static bool isLocalDestroy(const Action type) {
-    return (type == LOCAL_DESTROY);
-  }
-
-  /** Returns whether this action is local.
-   * @return true if this is LOCAL_INVALIDATE or LOCAL_DESTROY
-   */
-  inline static bool isLocal(const Action type) {
-    return (type == LOCAL_INVALIDATE) || (type == LOCAL_DESTROY);
-  }
-
-  /** Returns whether this action is distributed.
-   * @return true if this is INVALIDATE or DESTROY
-   */
-  inline static bool isDistributed(const Action type) {
-    return (type == INVALIDATE) || (type == DESTROY);
-  }
-
-  /** Return the ExpirationAction represented by the specified ordinal */
-  static const std::string& fromOrdinal(const int ordinal);
-
-  static const std::string& fromEnum(const Action action);
-
- private:
-  ExpirationAction() = delete;
-  static const std::string names[];
+enum class ExpirationAction {
+  /** When the region or cached object expires, it is invalidated. */
+  INVALIDATE = 0,
+  /** When expired, invalidated locally only. */
+  LOCAL_INVALIDATE,
+  /** When the region or cached object expires, it is destroyed. */
+  DESTROY,
+  /** When expired, destroyed locally only. */
+  LOCAL_DESTROY,
+  /** invalid type. */
+  INVALID_ACTION
 };
+
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/include/geode/ExpirationAttributes.hpp b/cppcache/include/geode/ExpirationAttributes.hpp
index 4694fc5..39a72dd 100644
--- a/cppcache/include/geode/ExpirationAttributes.hpp
+++ b/cppcache/include/geode/ExpirationAttributes.hpp
@@ -69,9 +69,9 @@ class _GEODE_EXPORT ExpirationAttributes {
    * @param expirationAction the action to take when the value expires
    * @throws IllegalArgumentException if expirationTime is nonpositive
    */
-  ExpirationAttributes(const std::chrono::seconds& expirationTime,
-                       const ExpirationAction::Action expirationAction =
-                           ExpirationAction::INVALIDATE);
+  ExpirationAttributes(
+      const std::chrono::seconds& expirationTime,
+      const ExpirationAction expirationAction = ExpirationAction::INVALIDATE);
 
   /** Returns the duration before a region or value expires.
    *
@@ -86,11 +86,11 @@ class _GEODE_EXPORT ExpirationAttributes {
    *
    * @return the action to take when expiring
    */
-  ExpirationAction::Action getAction() const;
-  void setAction(const ExpirationAction::Action& action);
+  ExpirationAction getAction() const;
+  void setAction(const ExpirationAction& action);
 
  private:
-  ExpirationAction::Action m_action;
+  ExpirationAction m_action;
   std::chrono::seconds m_timeout;
 };
 
diff --git a/cppcache/include/geode/RegionAttributes.hpp b/cppcache/include/geode/RegionAttributes.hpp
index 25bbacb..bc25186 100644
--- a/cppcache/include/geode/RegionAttributes.hpp
+++ b/cppcache/include/geode/RegionAttributes.hpp
@@ -112,7 +112,7 @@ class _GEODE_EXPORT RegionAttributes : public Serializable {
    */
   std::chrono::seconds getRegionTimeToLive() const;
 
-  ExpirationAction::Action getRegionTimeToLiveAction() const;
+  ExpirationAction getRegionTimeToLiveAction() const;
 
   /** Gets the idleTimeout expiration attributes for the region as a whole.
    *
@@ -120,7 +120,7 @@ class _GEODE_EXPORT RegionAttributes : public Serializable {
    */
   std::chrono::seconds getRegionIdleTimeout() const;
 
-  ExpirationAction::Action getRegionIdleTimeoutAction() const;
+  ExpirationAction getRegionIdleTimeoutAction() const;
 
   /** Gets the <code>timeToLive</code> expiration attributes for entries in this
    * region.
@@ -128,7 +128,7 @@ class _GEODE_EXPORT RegionAttributes : public Serializable {
    */
   std::chrono::seconds getEntryTimeToLive() const;
 
-  ExpirationAction::Action getEntryTimeToLiveAction() const;
+  ExpirationAction getEntryTimeToLiveAction() const;
 
   /** Gets the <code>idleTimeout</code> expiration attributes for entries in
    * this region.
@@ -137,7 +137,7 @@ class _GEODE_EXPORT RegionAttributes : public Serializable {
    */
   std::chrono::seconds getEntryIdleTimeout() const;
 
-  ExpirationAction::Action getEntryIdleTimeoutAction() const;
+  ExpirationAction getEntryIdleTimeoutAction() const;
 
   /**
    * If true, this region will store data in the current process.
@@ -180,7 +180,7 @@ class _GEODE_EXPORT RegionAttributes : public Serializable {
    * Returns the ExpirationAction used for LRU Eviction, default is
    * LOCAL_DESTROY.
    */
-  const ExpirationAction::Action getLruEvictionAction() const;
+  const ExpirationAction getLruEvictionAction() const;
 
   /**
    * Returns the name of the pool attached to the region.
@@ -355,11 +355,11 @@ class _GEODE_EXPORT RegionAttributes : public Serializable {
   RegionAttributes(const RegionAttributes& rhs);
   RegionAttributes();
 
-  ExpirationAction::Action m_regionTimeToLiveExpirationAction;
-  ExpirationAction::Action m_regionIdleTimeoutExpirationAction;
-  ExpirationAction::Action m_entryTimeToLiveExpirationAction;
-  ExpirationAction::Action m_entryIdleTimeoutExpirationAction;
-  ExpirationAction::Action m_lruEvictionAction;
+  ExpirationAction m_regionTimeToLiveExpirationAction;
+  ExpirationAction m_regionIdleTimeoutExpirationAction;
+  ExpirationAction m_entryTimeToLiveExpirationAction;
+  ExpirationAction m_entryIdleTimeoutExpirationAction;
+  ExpirationAction m_lruEvictionAction;
   std::shared_ptr<CacheWriter> m_cacheWriter;
   std::shared_ptr<CacheLoader> m_cacheLoader;
   std::shared_ptr<CacheListener> m_cacheListener;
diff --git a/cppcache/include/geode/RegionFactory.hpp b/cppcache/include/geode/RegionFactory.hpp
index 7495332..56cf0c0 100644
--- a/cppcache/include/geode/RegionFactory.hpp
+++ b/cppcache/include/geode/RegionFactory.hpp
@@ -120,7 +120,7 @@ class _GEODE_EXPORT RegionFactory {
    * @param idleTimeout the idleTimeout for entries in this region.
    * @return a reference to <code>this</code>
    */
-  RegionFactory& setEntryIdleTimeout(ExpirationAction::Action action,
+  RegionFactory& setEntryIdleTimeout(ExpirationAction action,
                                      std::chrono::seconds idleTimeout);
 
   /** Sets the timeToLive expiration attributes for region entries for the next
@@ -129,7 +129,7 @@ class _GEODE_EXPORT RegionFactory {
    * @param timeToLive the timeToLive for entries in this region.
    * @return a reference to <code>this</code>
    */
-  RegionFactory& setEntryTimeToLive(ExpirationAction::Action action,
+  RegionFactory& setEntryTimeToLive(ExpirationAction action,
                                     std::chrono::seconds timeToLive);
 
   /** Sets the idleTimeout expiration attributes for the region itself for the
@@ -138,7 +138,7 @@ class _GEODE_EXPORT RegionFactory {
    * @param idleTimeout the idleTimeout for the region as a whole.
    * @return a reference to <code>this</code>
    */
-  RegionFactory& setRegionIdleTimeout(ExpirationAction::Action action,
+  RegionFactory& setRegionIdleTimeout(ExpirationAction action,
                                       std::chrono::seconds idleTimeout);
 
   /** Sets the timeToLive expiration attributes for the region itself for the
@@ -147,7 +147,7 @@ class _GEODE_EXPORT RegionFactory {
    * @param timeToLive the timeToLive for the region as a whole.
    * @return a reference to <code>this</code>
    */
-  RegionFactory& setRegionTimeToLive(ExpirationAction::Action action,
+  RegionFactory& setRegionTimeToLive(ExpirationAction action,
                                      std::chrono::seconds timeToLive);
 
   // PERSISTENCE
diff --git a/cppcache/integration-test/CacheHelper.cpp b/cppcache/integration-test/CacheHelper.cpp
index e081cfe..31abe7b 100644
--- a/cppcache/integration-test/CacheHelper.cpp
+++ b/cppcache/integration-test/CacheHelper.cpp
@@ -420,7 +420,7 @@ std::shared_ptr<Region> CacheHelper::createRegion(
 std::shared_ptr<Region> CacheHelper::createRegion(
     const char* name, bool ack, bool caching, const std::chrono::seconds& ettl,
     const std::chrono::seconds& eit, const std::chrono::seconds& rttl,
-    const std::chrono::seconds& rit, int lel, ExpirationAction::Action action,
+    const std::chrono::seconds& rit, int lel, ExpirationAction action,
     const char* endpoints, bool clientNotificationEnabled) {
   AttributesFactory af;
   af.setCachingEnabled(caching);
@@ -552,7 +552,7 @@ std::shared_ptr<Region> CacheHelper::createRegionAndAttachPool(
     const char* name, bool ack, const char* poolName, bool caching,
     const std::chrono::seconds& ettl, const std::chrono::seconds& eit,
     const std::chrono::seconds& rttl, const std::chrono::seconds& rit, int lel,
-    ExpirationAction::Action action) {
+    ExpirationAction action) {
   RegionShortcut preDefRA = RegionShortcut::PROXY;
   if (caching) {
     preDefRA = RegionShortcut::CACHING_PROXY;
@@ -576,7 +576,7 @@ std::shared_ptr<Region> CacheHelper::createRegionAndAttachPool2(
     const std::shared_ptr<PartitionResolver>& aResolver, bool caching,
     const std::chrono::seconds& ettl, const std::chrono::seconds& eit,
     const std::chrono::seconds& rttl, const std::chrono::seconds& rit, int lel,
-    ExpirationAction::Action action) {
+    ExpirationAction action) {
   RegionShortcut preDefRA = RegionShortcut::PROXY;
   if (caching) {
     preDefRA = RegionShortcut::CACHING_PROXY;
@@ -644,7 +644,7 @@ std::shared_ptr<Region> CacheHelper::createPooledRegion(
     const std::chrono::seconds& ettl, const std::chrono::seconds& eit,
     const std::chrono::seconds& rttl, const std::chrono::seconds& rit, int lel,
     const std::shared_ptr<CacheListener>& cacheListener,
-    ExpirationAction::Action action) {
+    ExpirationAction action) {
   auto poolFacPtr = getCache()->getPoolManager().createFactory();
   poolFacPtr->setSubscriptionEnabled(clientNotificationEnabled);
 
@@ -683,7 +683,7 @@ std::shared_ptr<Region> CacheHelper::createPooledRegionConcurrencyCheckDisabled(
     const std::chrono::seconds& ettl, const std::chrono::seconds& eit,
     const std::chrono::seconds& rttl, const std::chrono::seconds& rit, int lel,
     const std::shared_ptr<CacheListener>& cacheListener,
-    ExpirationAction::Action action) {
+    ExpirationAction action) {
   auto poolFacPtr = getCache()->getPoolManager().createFactory();
   poolFacPtr->setSubscriptionEnabled(clientNotificationEnabled);
 
@@ -719,7 +719,7 @@ std::shared_ptr<Region> CacheHelper::createRegionDiscOverFlow(
     const char* name, bool caching, bool clientNotificationEnabled,
     const std::chrono::seconds& ettl, const std::chrono::seconds& eit,
     const std::chrono::seconds& rttl, const std::chrono::seconds& rit, int lel,
-    ExpirationAction::Action action) {
+    ExpirationAction action) {
   AttributesFactory af;
   af.setCachingEnabled(caching);
   af.setLruEntriesLimit(lel);
@@ -752,7 +752,7 @@ std::shared_ptr<Region> CacheHelper::createPooledRegionDiscOverFlow(
     const std::chrono::seconds& ettl, const std::chrono::seconds& eit,
     const std::chrono::seconds& rttl, const std::chrono::seconds& rit, int lel,
     const std::shared_ptr<CacheListener>& cacheListener,
-    ExpirationAction::Action action) {
+    ExpirationAction action) {
   auto poolFacPtr = getCache()->getPoolManager().createFactory();
   poolFacPtr->setSubscriptionEnabled(clientNotificationEnabled);
 
@@ -808,7 +808,7 @@ std::shared_ptr<Region> CacheHelper::createPooledRegionSticky(
     const std::chrono::seconds& ettl, const std::chrono::seconds& eit,
     const std::chrono::seconds& rttl, const std::chrono::seconds& rit, int lel,
     const std::shared_ptr<CacheListener>& cacheListener,
-    ExpirationAction::Action action) {
+    ExpirationAction action) {
   auto poolFacPtr = getCache()->getPoolManager().createFactory();
   poolFacPtr->setSubscriptionEnabled(clientNotificationEnabled);
   poolFacPtr->setThreadLocalConnections(true);
@@ -849,7 +849,7 @@ std::shared_ptr<Region> CacheHelper::createPooledRegionStickySingleHop(
     const std::chrono::seconds& ettl, const std::chrono::seconds& eit,
     const std::chrono::seconds& rttl, const std::chrono::seconds& rit, int lel,
     const std::shared_ptr<CacheListener>& cacheListener,
-    ExpirationAction::Action action) {
+    ExpirationAction action) {
   LOG("createPooledRegionStickySingleHop");
   auto poolFacPtr = getCache()->getPoolManager().createFactory();
   poolFacPtr->setSubscriptionEnabled(clientNotificationEnabled);
diff --git a/cppcache/integration-test/CacheHelper.hpp b/cppcache/integration-test/CacheHelper.hpp
index 00f2038..664641d 100644
--- a/cppcache/integration-test/CacheHelper.hpp
+++ b/cppcache/integration-test/CacheHelper.hpp
@@ -134,7 +134,7 @@ class CacheHelper {
       const std::chrono::seconds& eit = std::chrono::seconds::zero(),
       const std::chrono::seconds& rttl = std::chrono::seconds::zero(),
       const std::chrono::seconds& rit = std::chrono::seconds::zero(),
-      int lel = 0, ExpirationAction::Action action = ExpirationAction::DESTROY,
+      int lel = 0, ExpirationAction action = ExpirationAction::DESTROY,
       const char* endpoints = 0, bool clientNotificationEnabled = false);
 
   std::shared_ptr<Pool> createPool(
@@ -171,7 +171,7 @@ class CacheHelper {
       const std::chrono::seconds& eit = std::chrono::seconds::zero(),
       const std::chrono::seconds& rttl = std::chrono::seconds::zero(),
       const std::chrono::seconds& rit = std::chrono::seconds::zero(),
-      int lel = 0, ExpirationAction::Action action = ExpirationAction::DESTROY);
+      int lel = 0, ExpirationAction action = ExpirationAction::DESTROY);
 
   std::shared_ptr<Region> createRegionAndAttachPool2(
       const char* name, bool ack, const char* poolName,
@@ -181,7 +181,7 @@ class CacheHelper {
       const std::chrono::seconds& eit = std::chrono::seconds::zero(),
       const std::chrono::seconds& rttl = std::chrono::seconds::zero(),
       const std::chrono::seconds& rit = std::chrono::seconds::zero(),
-      int lel = 0, ExpirationAction::Action action = ExpirationAction::DESTROY);
+      int lel = 0, ExpirationAction action = ExpirationAction::DESTROY);
 
   void addServerLocatorEPs(const char* epList,
                            std::shared_ptr<PoolFactory> pfPtr,
@@ -201,7 +201,7 @@ class CacheHelper {
       const std::chrono::seconds& rit = std::chrono::seconds::zero(),
       int lel = 0,
       const std::shared_ptr<CacheListener>& cacheListener = nullptr,
-      ExpirationAction::Action action = ExpirationAction::DESTROY);
+      ExpirationAction action = ExpirationAction::DESTROY);
 
   std::shared_ptr<Region> createPooledRegionConcurrencyCheckDisabled(
       const char* name, bool ack, const char* locators = 0,
@@ -214,7 +214,7 @@ class CacheHelper {
       const std::chrono::seconds& rit = std::chrono::seconds::zero(),
       int lel = 0,
       const std::shared_ptr<CacheListener>& cacheListener = nullptr,
-      ExpirationAction::Action action = ExpirationAction::DESTROY);
+      ExpirationAction action = ExpirationAction::DESTROY);
 
   std::shared_ptr<Region> createRegionDiscOverFlow(
       const char* name, bool caching = true,
@@ -223,7 +223,7 @@ class CacheHelper {
       const std::chrono::seconds& eit = std::chrono::seconds::zero(),
       const std::chrono::seconds& rttl = std::chrono::seconds::zero(),
       const std::chrono::seconds& rit = std::chrono::seconds::zero(),
-      int lel = 0, ExpirationAction::Action action = ExpirationAction::DESTROY);
+      int lel = 0, ExpirationAction action = ExpirationAction::DESTROY);
 
   std::shared_ptr<Region> createPooledRegionDiscOverFlow(
       const char* name, bool ack, const char* locators = 0,
@@ -235,7 +235,7 @@ class CacheHelper {
       const std::chrono::seconds& rit = std::chrono::seconds::zero(),
       int lel = 0,
       const std::shared_ptr<CacheListener>& cacheListener = nullptr,
-      ExpirationAction::Action action = ExpirationAction::DESTROY);
+      ExpirationAction action = ExpirationAction::DESTROY);
 
   std::shared_ptr<Region> createPooledRegionSticky(
       const char* name, bool ack, const char* locators = 0,
@@ -247,7 +247,7 @@ class CacheHelper {
       const std::chrono::seconds& rit = std::chrono::seconds::zero(),
       int lel = 0,
       const std::shared_ptr<CacheListener>& cacheListener = nullptr,
-      ExpirationAction::Action action = ExpirationAction::DESTROY);
+      ExpirationAction action = ExpirationAction::DESTROY);
 
   std::shared_ptr<Region> createPooledRegionStickySingleHop(
       const char* name, bool ack, const char* locators = 0,
@@ -259,7 +259,7 @@ class CacheHelper {
       const std::chrono::seconds& rit = std::chrono::seconds::zero(),
       int lel = 0,
       const std::shared_ptr<CacheListener>& cacheListener = nullptr,
-      ExpirationAction::Action action = ExpirationAction::DESTROY);
+      ExpirationAction action = ExpirationAction::DESTROY);
 
   std::shared_ptr<Region> createSubregion(
       std::shared_ptr<Region>& parent, const char* name, bool ack, bool caching,
diff --git a/cppcache/integration-test/ThinClientHelper.hpp b/cppcache/integration-test/ThinClientHelper.hpp
index 9c9b8ea..7910b6b 100644
--- a/cppcache/integration-test/ThinClientHelper.hpp
+++ b/cppcache/integration-test/ThinClientHelper.hpp
@@ -483,7 +483,7 @@ std::shared_ptr<Region> createRegionAndAttachPool(
     const std::chrono::seconds& eit = std::chrono::seconds::zero(),
     const std::chrono::seconds& rttl = std::chrono::seconds::zero(),
     const std::chrono::seconds& rit = std::chrono::seconds::zero(), int lel = 0,
-    ExpirationAction::Action action = ExpirationAction::DESTROY) {
+    ExpirationAction action = ExpirationAction::DESTROY) {
   LOG("createRegionAndAttachPool() entered.");
  auto regPtr = getHelper()->createRegionAndAttachPool(
       name, ack, poolName, caching, ettl, eit, rttl, rit, lel, action);
diff --git a/cppcache/integration-test/testExpiration.cpp b/cppcache/integration-test/testExpiration.cpp
index 772a530..73b9313 100644
--- a/cppcache/integration-test/testExpiration.cpp
+++ b/cppcache/integration-test/testExpiration.cpp
@@ -23,7 +23,7 @@
 
 using namespace apache::geode::client;
 
-ExpirationAction::Action action = ExpirationAction::DESTROY;
+ExpirationAction action = ExpirationAction::DESTROY;
 
 // This test is for serially running the tests.
 
diff --git a/cppcache/integration-test/testThinClientLRUExpiration.cpp b/cppcache/integration-test/testThinClientLRUExpiration.cpp
index 4d7861c..6b56111 100644
--- a/cppcache/integration-test/testThinClientLRUExpiration.cpp
+++ b/cppcache/integration-test/testThinClientLRUExpiration.cpp
@@ -141,7 +141,7 @@ void createRegion(const char* name, bool ackMode,
                   const std::chrono::seconds& rttl,
                   const std::chrono::seconds& rit, int lel,
                   bool clientNotificationEnabled = false,
-                  ExpirationAction::Action action = ExpirationAction::DESTROY) {
+                  ExpirationAction action = ExpirationAction::DESTROY) {
   fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
   fflush(stdout);
   auto
@@ -235,7 +235,7 @@ void createThinClientRegion(
     const std::chrono::seconds& eit, const std::chrono::seconds& rttl,
     const std::chrono::seconds& rit, int lel, int noOfEntry = 0, int rgnOpt = 0,
     bool destroyRgn = true, bool clientNotificationEnabled = true,
-    ExpirationAction::Action action = ExpirationAction::DESTROY) {
+    ExpirationAction action = ExpirationAction::DESTROY) {
   if (destroyRgn) {
     try {
       doRgnOperations(regionName, noOfEntry, rgnOpt);
@@ -264,7 +264,7 @@ DUNIT_TASK(CLIENT1, StepOneCase1)
     initClient(true);
     // regionName, ettl, eit , rttl, rit,lel,endpoints,noOfEntry,rgnOpetation
     // - [put-0/get-5/destroy-3] ,destroyRgn - [true/false]
-    // ,clientNotificationEnabled - [true/false] ,ExpirationAction::Action
+    // ,clientNotificationEnabled - [true/false] ,ExpirationAction
     getHelper()->createPoolWithLocators("LRUPool", locatorsG, true);
     createThinClientRegion(regionNames[0], std::chrono::seconds(4),
                            std::chrono::seconds(2), std::chrono::seconds(0),
@@ -278,7 +278,7 @@ DUNIT_TASK(CLIENT2, StepTwoCase1)
     // regionName, ettl, eit , rttl,
     // rit,lel,endpoints,noOfEntry,rgnOpetation - [put-0/get-5/destroy-3]
     // ,destroyRgn - [true/false] ,clientNotificationEnabled - [true/false]
-    // ,ExpirationAction::Action
+    // ,ExpirationAction
     getHelper()->createPoolWithLocators("LRUPool", locatorsG, true);
     createThinClientRegion(regionNames[0], std::chrono::seconds(0),
                            std::chrono::seconds(0), std::chrono::seconds(0),
@@ -328,7 +328,7 @@ DUNIT_TASK(CLIENT1, StepOneCase2)
     // rit,lel,endpoints,noOfEntry,rgnOpetation -
     // [put-0/get-5/destroy-3] ,destroyRgn - [true/false]
     // ,clientNotificationEnabled - [true/false]
-    // ,ExpirationAction::Action
+    // ,ExpirationAction
     createThinClientRegion(regionNames[0], std::chrono::seconds(4),
                            std::chrono::seconds(2), std::chrono::seconds(0),
                            std::chrono::seconds(0), 0, 100, 3, true, true,
@@ -343,7 +343,7 @@ DUNIT_TASK(CLIENT2, StepTwoCase2)
     // rit,lel,endpoints,noOfEntry,rgnOpetation -
     // [put-0/get-5/destroy-3] ,destroyRgn - [true/false]
     // ,clientNotificationEnabled - [true/false]
-    // ,ExpirationAction::Action
+    // ,ExpirationAction
     createThinClientRegion(regionNames[0], std::chrono::seconds(0),
                            std::chrono::seconds(0), std::chrono::seconds(0),
                            std::chrono::seconds(0), 0, 100, 3);
@@ -395,7 +395,7 @@ DUNIT_TASK(CLIENT1, StepOneCase3)
     // rit,lel,endpoints,noOfEntry,rgnOpetation -
     // [put-0/get-5/destroy-3] ,destroyRgn -
     // [true/false] ,clientNotificationEnabled -
-    // [true/false] ,ExpirationAction::Action
+    // [true/false] ,ExpirationAction
     createThinClientRegion(regionNames[0], std::chrono::seconds(0),
                            std::chrono::seconds(0), std::chrono::seconds(0),
                            std::chrono::seconds(0), 5, 10, 3);
@@ -408,7 +408,7 @@ DUNIT_TASK(CLIENT2, StepTwoCase3)
     // rit,lel,endpoints,noOfEntry,rgnOpetation -
     // [put-0/get-5/destroy-3] ,destroyRgn -
     // [true/false] ,clientNotificationEnabled -
-    // [true/false] ,ExpirationAction::Action
+    // [true/false] ,ExpirationAction
     createThinClientRegion(regionNames[0], std::chrono::seconds(0),
                            std::chrono::seconds(0), std::chrono::seconds(0),
                            std::chrono::seconds(0), 0, 10, 3);
@@ -458,7 +458,7 @@ DUNIT_TASK(CLIENT1, StepOneCase4)
     // ,destroyRgn - [true/false]
     // ,clientNotificationEnabled -
     // [true/false]
-    // ,ExpirationAction::Action
+    // ,ExpirationAction
     createThinClientRegion(regionNames[0], std::chrono::seconds(5),
                            std::chrono::seconds(0), std::chrono::seconds(0),
                            std::chrono::seconds(0), 5, 10, 3, true, true,
@@ -474,7 +474,7 @@ DUNIT_TASK(CLIENT2, StepTwoCase4)
     // ,destroyRgn - [true/false]
     // ,clientNotificationEnabled -
     // [true/false]
-    // ,ExpirationAction::Action
+    // ,ExpirationAction
     createThinClientRegion(regionNames[0], std::chrono::seconds(0),
                            std::chrono::seconds(0), std::chrono::seconds(0),
                            std::chrono::seconds(0), 0, 10, 3);
@@ -533,7 +533,7 @@ DUNIT_TASK(CLIENT1, StepOneCase5)
     // [true/false]
     // ,clientNotificationEnabled
     // - [true/false]
-    // ,ExpirationAction::Action
+    // ,ExpirationAction
     createThinClientRegion(regionNames[0], std::chrono::seconds(5),
                            std::chrono::seconds(0), std::chrono::seconds(0),
                            std::chrono::seconds(0), 5, 10, 3);
@@ -551,7 +551,7 @@ DUNIT_TASK(CLIENT2, StepTwoCase5)
     // [true/false]
     // ,clientNotificationEnabled
     // - [true/false]
-    // ,ExpirationAction::Action
+    // ,ExpirationAction
     createThinClientRegion(regionNames[0], std::chrono::seconds(0),
                            std::chrono::seconds(0), std::chrono::seconds(0),
                            std::chrono::seconds(0), 0, 10, 3);
@@ -639,7 +639,7 @@ DUNIT_TASK(CLIENT1, StepOneCase6)
     // ,clientNotificationEnabled
     // -
     // [true/false]
-    // ,ExpirationAction::Action
+    // ,ExpirationAction
     createThinClientRegion(regionNames[0], std::chrono::seconds(0),
                            std::chrono::seconds(5), std::chrono::seconds(0),
                            std::chrono::seconds(0), 5, 10, 3, true, true,
@@ -661,7 +661,7 @@ DUNIT_TASK(CLIENT2, StepTwoCase6)
     // ,clientNotificationEnabled
     // -
     // [true/false]
-    // ,ExpirationAction::Action
+    // ,ExpirationAction
     createThinClientRegion(regionNames[0], std::chrono::seconds(0),
                            std::chrono::seconds(0), std::chrono::seconds(0),
                            std::chrono::seconds(0), 0, 10, 3);
@@ -722,7 +722,7 @@ DUNIT_TASK(CLIENT1, StepOneCase7)
   {
     // regionName, ettl, eit , rttl, rit,lel,endpoints,noOfEntry,rgnOpetation -
     // [put-0/get-5/destroy-3] ,destroyRgn - [true/false]
-    // ,clientNotificationEnabled - [true/false] ,ExpirationAction::Action
+    // ,clientNotificationEnabled - [true/false] ,ExpirationAction
     createThinClientRegion(regionNames[0], std::chrono::seconds(0),
                            std::chrono::seconds(0), std::chrono::seconds(10),
                            std::chrono::seconds(0), 0, 10, 3);
@@ -733,7 +733,7 @@ DUNIT_TASK(CLIENT2, StepTwoCase7)
   {
     // regionName, ettl, eit , rttl, rit,lel,endpoints,noOfEntry,rgnOpetation -
     // [put-0/get-5/destroy-3] ,destroyRgn - [true/false]
-    // ,clientNotificationEnabled - [true/false] ,ExpirationAction::Action
+    // ,clientNotificationEnabled - [true/false] ,ExpirationAction
     createThinClientRegion(regionNames[0], std::chrono::seconds(0),
                            std::chrono::seconds(0), std::chrono::seconds(0),
                            std::chrono::seconds(0), 0, 10, 3);
@@ -774,7 +774,7 @@ DUNIT_TASK(CLIENT1, StepOneCase8)
     ACE_OS::sleep(10);
     // regionName, ettl, eit , rttl, rit,lel,endpoints,noOfEntry,rgnOpetation -
     // [put-0/get-5/destroy-3] ,destroyRgn - [true/false]
-    // ,clientNotificationEnabled - [true/false] ,ExpirationAction::Action
+    // ,clientNotificationEnabled - [true/false] ,ExpirationAction
     createThinClientRegion(regionNames[1], std::chrono::seconds(0),
                            std::chrono::seconds(0), std::chrono::seconds(8),
                            std::chrono::seconds(0), 0, 0, 6, false);
@@ -785,7 +785,7 @@ DUNIT_TASK(CLIENT2, StepTwoCase8)
   {
     // regionName, ettl, eit , rttl, rit,lel,endpoints,noOfEntry,rgnOpetation -
     // [put-0/get-5/destroy-3] ,destroyRgn - [true/false]
-    // ,clientNotificationEnabled - [true/false] ,ExpirationAction::Action
+    // ,clientNotificationEnabled - [true/false] ,ExpirationAction
     createThinClientRegion(regionNames[1], std::chrono::seconds(0),
                            std::chrono::seconds(0), std::chrono::seconds(0),
                            std::chrono::seconds(0), 0, 0, 6, false);
@@ -828,7 +828,7 @@ DUNIT_TASK(CLIENT1, StepOneCase9)
   {
     // regionName, ettl, eit , rttl, rit,lel,endpoints,noOfEntry,rgnOpetation -
     // [put-0/get-5/destroy-3] ,destroyRgn - [true/false]
-    // ,clientNotificationEnabled - [true/false] ,ExpirationAction::Action
+    // ,clientNotificationEnabled - [true/false] ,ExpirationAction
     createThinClientRegion(regionNames[2], std::chrono::seconds(4),
                            std::chrono::seconds(0), std::chrono::seconds(8),
                            std::chrono::seconds(0), 5, 0, 6, false);
@@ -839,7 +839,7 @@ DUNIT_TASK(CLIENT2, StepTwoCase9)
   {
     // regionName, ettl, eit , rttl, rit,lel,endpoints,noOfEntry,rgnOpetation -
     // [put-0/get-5/destroy-3] ,destroyRgn - [true/false]
-    // ,clientNotificationEnabled - [true/false] ,ExpirationAction::Action
+    // ,clientNotificationEnabled - [true/false] ,ExpirationAction
     createThinClientRegion(regionNames[2], std::chrono::seconds(0),
                            std::chrono::seconds(0), std::chrono::seconds(0),
                            std::chrono::seconds(0), 0, 0, 6, false);
@@ -883,7 +883,7 @@ DUNIT_TASK(CLIENT1, StepOneCase10)
   {
     // regionName, ettl, eit , rttl, rit,lel,endpoints,noOfEntry,rgnOpetation -
     // [put-0/get-5/destroy-3] ,destroyRgn - [true/false]
-    // ,clientNotificationEnabled - [true/false] ,ExpirationAction::Action
+    // ,clientNotificationEnabled - [true/false] ,ExpirationAction
     createThinClientRegion(regionNames[3], std::chrono::seconds(4),
                            std::chrono::seconds(0), std::chrono::seconds(8),
                            std::chrono::seconds(0), 5, 0, 6, false);
@@ -894,7 +894,7 @@ DUNIT_TASK(CLIENT2, StepTwoCase10)
   {
     // regionName, ettl, eit , rttl, rit,lel,endpoints,noOfEntry,rgnOpetation -
     // [put-0/get-5/destroy-3] ,destroyRgn - [true/false]
-    // ,clientNotificationEnabled - [true/false] ,ExpirationAction::Action
+    // ,clientNotificationEnabled - [true/false] ,ExpirationAction
     createThinClientRegion(regionNames[3], std::chrono::seconds(0),
                            std::chrono::seconds(0), std::chrono::seconds(0),
                            std::chrono::seconds(0), 0, 0, 6, false);
@@ -939,7 +939,7 @@ DUNIT_TASK(CLIENT1, StepOneCase11)
   {
     // regionName, ettl, eit , rttl, rit,lel,endpoints,noOfEntry,rgnOpetation -
     // [put-0/get-5/destroy-3] ,destroyRgn - [true/false]
-    // ,clientNotificationEnabled - [true/false] ,ExpirationAction::Action
+    // ,clientNotificationEnabled - [true/false] ,ExpirationAction
     createThinClientRegion(regionNames[4], std::chrono::seconds(4),
                            std::chrono::seconds(0), std::chrono::seconds(0),
                            std::chrono::seconds(0), 5, 0, 6, false);
@@ -954,7 +954,7 @@ DUNIT_TASK(CLIENT2, StepTwoCase11)
   {
     // regionName, ettl, eit , rttl, rit,lel,endpoints,noOfEntry,rgnOpetation -
     // [put-0/get-5/destroy-3] ,destroyRgn - [true/false]
-    // ,clientNotificationEnabled - [true/false] ,ExpirationAction::Action
+    // ,clientNotificationEnabled - [true/false] ,ExpirationAction
     createThinClientRegion(regionNames[4], std::chrono::seconds(0),
                            std::chrono::seconds(0), std::chrono::seconds(0),
                            std::chrono::seconds(0), 0, 0, 6, false);
@@ -1078,7 +1078,7 @@ DUNIT_TASK(CLIENT1, StepOneCase12)
   {
     // regionName, ettl, eit , rttl, rit,lel,endpoints,noOfEntry,rgnOpetation -
     // [put-0/get-5/destroy-3] ,destroyRgn - [true/false]
-    // ,clientNotificationEnabled - [true/false] ,ExpirationAction::Action
+    // ,clientNotificationEnabled - [true/false] ,ExpirationAction
     createThinClientRegion(regionNames[5], std::chrono::seconds(4),
                            std::chrono::seconds(0), std::chrono::seconds(0),
                            std::chrono::seconds(0), 5, 0, 6, false);
@@ -1093,7 +1093,7 @@ DUNIT_TASK(CLIENT2, StepTwoCase12)
   {
     // regionName, ettl, eit , rttl, rit,lel,endpoints,noOfEntry,rgnOpetation -
     // [put-0/get-5/destroy-3] ,destroyRgn - [true/false]
-    // ,clientNotificationEnabled - [true/false] ,ExpirationAction::Action
+    // ,clientNotificationEnabled - [true/false] ,ExpirationAction
     createThinClientRegion(regionNames[5], std::chrono::seconds(0),
                            std::chrono::seconds(0), std::chrono::seconds(0),
                            std::chrono::seconds(0), 0, 0, 6, false);
@@ -1176,7 +1176,7 @@ DUNIT_TASK(CLIENT1, StepOneCase13)
   {
     // regionName, ettl, eit , rttl, rit,lel,endpoints,noOfEntry,rgnOpetation -
     // [put-0/get-5/destroy-3] ,destroyRgn - [true/false]
-    // ,clientNotificationEnabled - [true/false] ,ExpirationAction::Action
+    // ,clientNotificationEnabled - [true/false] ,ExpirationAction
     initClient(true);
     getHelper()->createPoolWithLocators("LRUPool", locatorsG, true);
     createThinClientRegion(regionNames[5], std::chrono::seconds(4),
@@ -1193,7 +1193,7 @@ DUNIT_TASK(CLIENT2, StepTwoCase13)
   {
     // regionName, ettl, eit , rttl, rit,lel,endpoints,noOfEntry,rgnOpetation -
     // [put-0/get-5/destroy-3] ,destroyRgn - [true/false]
-    // ,clientNotificationEnabled - [true/false] ,ExpirationAction::Action
+    // ,clientNotificationEnabled - [true/false] ,ExpirationAction
     initClient(true);
     getHelper()->createPoolWithLocators("LRUPool", locatorsG, true);
     createThinClientRegion(regionNames[5], std::chrono::seconds(0),
diff --git a/cppcache/integration-test/testXmlCacheCreationWithOverFlow.cpp b/cppcache/integration-test/testXmlCacheCreationWithOverFlow.cpp
index 860b20e..8681651 100644
--- a/cppcache/integration-test/testXmlCacheCreationWithOverFlow.cpp
+++ b/cppcache/integration-test/testXmlCacheCreationWithOverFlow.cpp
@@ -161,7 +161,7 @@ int testXmlCacheCreationWithOverflow() {
     return -1;
   }
 
-  ExpirationAction::Action action1 = regAttr->getRegionIdleTimeoutAction();
+  ExpirationAction action1 = regAttr->getRegionIdleTimeoutAction();
   std::cout << "RegionIdleTimeoutAction : Destroy" << std::endl;
   if (action1 != ExpirationAction::DESTROY) {
     return -1;
diff --git a/cppcache/src/AttributesFactory.cpp b/cppcache/src/AttributesFactory.cpp
index 51b994f..a9473d6 100644
--- a/cppcache/src/AttributesFactory.cpp
+++ b/cppcache/src/AttributesFactory.cpp
@@ -87,28 +87,28 @@ AttributesFactory& AttributesFactory::setPartitionResolver(
 }
 
 AttributesFactory& AttributesFactory::setEntryIdleTimeout(
-    ExpirationAction::Action action, std::chrono::seconds idleTimeout) {
+    ExpirationAction action, std::chrono::seconds idleTimeout) {
   m_regionAttributes.m_entryIdleTimeout = idleTimeout;
   m_regionAttributes.m_entryIdleTimeoutExpirationAction = action;
   return *this;
 }
 
 AttributesFactory& AttributesFactory::setEntryTimeToLive(
-    ExpirationAction::Action action, std::chrono::seconds timeToLive) {
+    ExpirationAction action, std::chrono::seconds timeToLive) {
   m_regionAttributes.m_entryTimeToLive = timeToLive;
   m_regionAttributes.m_entryTimeToLiveExpirationAction = action;
   return *this;
 }
 
 AttributesFactory& AttributesFactory::setRegionIdleTimeout(
-    ExpirationAction::Action action, std::chrono::seconds idleTimeout) {
+    ExpirationAction action, std::chrono::seconds idleTimeout) {
   m_regionAttributes.m_regionIdleTimeout = idleTimeout;
   m_regionAttributes.m_regionIdleTimeoutExpirationAction = action;
   return *this;
 }
 
 AttributesFactory& AttributesFactory::setRegionTimeToLive(
-    ExpirationAction::Action action, std::chrono::seconds timeToLive) {
+    ExpirationAction action, std::chrono::seconds timeToLive) {
   m_regionAttributes.m_regionTimeToLive = timeToLive;
   m_regionAttributes.m_regionTimeToLiveExpirationAction = action;
   return *this;
diff --git a/cppcache/src/AttributesMutator.cpp b/cppcache/src/AttributesMutator.cpp
index 10c4899..a74d1c0 100644
--- a/cppcache/src/AttributesMutator.cpp
+++ b/cppcache/src/AttributesMutator.cpp
@@ -34,8 +34,8 @@ std::chrono::seconds AttributesMutator::setEntryIdleTimeout(
       ->adjustEntryExpiryDuration(idleTimeout);
 }
 
-ExpirationAction::Action AttributesMutator::setEntryIdleTimeoutAction(
-    ExpirationAction::Action action) {
+ExpirationAction AttributesMutator::setEntryIdleTimeoutAction(
+    ExpirationAction action) {
   auto rImpl = std::static_pointer_cast<RegionInternal>(m_region);
   return rImpl->adjustEntryExpiryAction(action);
 }
@@ -46,8 +46,8 @@ std::chrono::seconds AttributesMutator::setEntryTimeToLive(
   return rImpl->adjustEntryExpiryDuration(timeToLive);
 }
 
-ExpirationAction::Action AttributesMutator::setEntryTimeToLiveAction(
-    ExpirationAction::Action action) {
+ExpirationAction AttributesMutator::setEntryTimeToLiveAction(
+    ExpirationAction action) {
   auto rImpl = std::static_pointer_cast<RegionInternal>(m_region);
   return rImpl->adjustEntryExpiryAction(action);
 }
@@ -58,8 +58,8 @@ std::chrono::seconds AttributesMutator::setRegionIdleTimeout(
   return rImpl->adjustRegionExpiryDuration(idleTimeout);
 }
 
-ExpirationAction::Action AttributesMutator::setRegionIdleTimeoutAction(
-    ExpirationAction::Action action) {
+ExpirationAction AttributesMutator::setRegionIdleTimeoutAction(
+    ExpirationAction action) {
   auto rImpl = std::static_pointer_cast<RegionInternal>(m_region);
   return rImpl->adjustRegionExpiryAction(action);
 }
@@ -70,8 +70,8 @@ std::chrono::seconds AttributesMutator::setRegionTimeToLive(
   return rImpl->adjustRegionExpiryDuration(timeToLive);
 }
 
-ExpirationAction::Action AttributesMutator::setRegionTimeToLiveAction(
-    ExpirationAction::Action action) {
+ExpirationAction AttributesMutator::setRegionTimeToLiveAction(
+    ExpirationAction action) {
   auto rImpl = std::static_pointer_cast<RegionInternal>(m_region);
   return rImpl->adjustRegionExpiryAction(action);
 }
diff --git a/cppcache/src/CacheXmlParser.cpp b/cppcache/src/CacheXmlParser.cpp
index 52d0bb8..90438a4 100644
--- a/cppcache/src/CacheXmlParser.cpp
+++ b/cppcache/src/CacheXmlParser.cpp
@@ -1060,7 +1060,7 @@ void CacheXmlParser::startExpirationAttributes(const xmlChar** atts) {
   }
   std::string timeOut;
   std::chrono::seconds timeOutSeconds;
-  ExpirationAction::Action expire = ExpirationAction::INVALID_ACTION;
+  ExpirationAction expire = ExpirationAction::INVALID_ACTION;
   for (int i = 0; (atts[i] != nullptr); i++) {
     if (strcmp(TIMEOUT, (char*)atts[i]) == 0) {
       i++;
diff --git a/cppcache/src/EntryExpiryHandler.cpp b/cppcache/src/EntryExpiryHandler.cpp
index b4d3168..54f270e 100644
--- a/cppcache/src/EntryExpiryHandler.cpp
+++ b/cppcache/src/EntryExpiryHandler.cpp
@@ -32,7 +32,7 @@ using namespace apache::geode::client;
 
 EntryExpiryHandler::EntryExpiryHandler(std::shared_ptr<RegionInternal>& rptr,
                                        std::shared_ptr<MapEntryImpl>& entryPtr,
-                                       ExpirationAction::Action action,
+                                       ExpirationAction action,
                                        std::chrono::seconds duration)
     : m_regionPtr(rptr),
       m_entryPtr(entryPtr),
diff --git a/cppcache/src/EntryExpiryHandler.hpp b/cppcache/src/EntryExpiryHandler.hpp
index d7a1f5b..9fbdbdc 100644
--- a/cppcache/src/EntryExpiryHandler.hpp
+++ b/cppcache/src/EntryExpiryHandler.hpp
@@ -50,8 +50,7 @@ class _GEODE_EXPORT EntryExpiryHandler : public ACE_Event_Handler {
    */
   EntryExpiryHandler(std::shared_ptr<RegionInternal>& rptr,
                      std::shared_ptr<MapEntryImpl>& entryPtr,
-                     ExpirationAction::Action action,
-                     std::chrono::seconds duration);
+                     ExpirationAction action, std::chrono::seconds duration);
 
   /** This task object will be registered with the Timer Queue.
    *  When the timer expires the handle_timeout is invoked.
@@ -68,7 +67,7 @@ class _GEODE_EXPORT EntryExpiryHandler : public ACE_Event_Handler {
   // The ExpMapEntry contained in the ConcurrentMap against the key.
   std::shared_ptr<MapEntryImpl> m_entryPtr;
   // Action to be taken on expiry
-  ExpirationAction::Action m_action;
+  ExpirationAction m_action;
   // Duration after which the task should be reset in case of
   // modification.
   std::chrono::seconds m_duration;
diff --git a/cppcache/src/ExpirationAction.cpp b/cppcache/src/ExpirationAction.cpp
deleted file mode 100644
index fc144e9..0000000
--- a/cppcache/src/ExpirationAction.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <geode/ExpirationAction.hpp>
-
-namespace apache {
-namespace geode {
-namespace client {
-
-const std::string ExpirationAction::names[] = {"INVALIDATE", "LOCAL_INVALIDATE",
-                                               "DESTROY", "LOCAL_DESTROY",
-                                               "INVALID_ACTION"};
-
-ExpirationAction::Action ExpirationAction::fromName(const std::string& name) {
-  for (int i = INVALIDATE; i <= INVALID_ACTION; i++) {
-    if (names[i] == name) {
-      return static_cast<Action>(i);
-    }
-  }
-  return INVALID_ACTION;
-}
-
-const std::string& ExpirationAction::fromOrdinal(const int ordinal) {
-  if (INVALIDATE <= ordinal && ordinal <= LOCAL_DESTROY) {
-    return names[ordinal];
-  }
-  return names[INVALID_ACTION];
-}
-
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
diff --git a/cppcache/src/ExpirationAttributes.cpp b/cppcache/src/ExpirationAttributes.cpp
index 4bc3436..2e153b0 100644
--- a/cppcache/src/ExpirationAttributes.cpp
+++ b/cppcache/src/ExpirationAttributes.cpp
@@ -23,7 +23,7 @@ ExpirationAttributes::ExpirationAttributes()
 
 ExpirationAttributes::ExpirationAttributes(
     const std::chrono::seconds& expirationTime,
-    const ExpirationAction::Action expirationAction)
+    const ExpirationAction expirationAction)
     : m_action(ExpirationAction::INVALIDATE), m_timeout(expirationTime) {}
 const std::chrono::seconds& ExpirationAttributes::getTimeout() const {
   return m_timeout;
@@ -33,9 +33,7 @@ void ExpirationAttributes::setTimeout(const std::chrono::seconds& timeout) {
   m_timeout = timeout;
 }
 
-ExpirationAction::Action ExpirationAttributes::getAction() const {
-  return m_action;
-}
-void ExpirationAttributes::setAction(const ExpirationAction::Action& action) {
+ExpirationAction ExpirationAttributes::getAction() const { return m_action; }
+void ExpirationAttributes::setAction(const ExpirationAction& action) {
   m_action = action;
 }
diff --git a/cppcache/src/LocalRegion.cpp b/cppcache/src/LocalRegion.cpp
index 903b062..44c50d5 100644
--- a/cppcache/src/LocalRegion.cpp
+++ b/cppcache/src/LocalRegion.cpp
@@ -2806,8 +2806,8 @@ uint32_t LocalRegion::adjustLruEntriesLimit(uint32_t limit) {
   return oldValue;
 }
 
-ExpirationAction::Action LocalRegion::adjustRegionExpiryAction(
-    ExpirationAction::Action action) {
+ExpirationAction LocalRegion::adjustRegionExpiryAction(
+    ExpirationAction action) {
   CHECK_DESTROY_PENDING(TryReadGuard, LocalRegion::adjustRegionExpiryAction);
 
  auto attrs = m_regionAttributes;
@@ -2817,7 +2817,7 @@ ExpirationAction::Action LocalRegion::adjustRegionExpiryAction(
        "Cannot change region ExpirationAction for region created without "
        "region expiry.");
   }
-  ExpirationAction::Action oldValue = getRegionExpiryAction();
+  ExpirationAction oldValue = getRegionExpiryAction();
 
   setRegionTimeToLiveExpirationAction(action);
   setRegionIdleTimeoutExpirationAction(action);
@@ -2826,8 +2826,7 @@ ExpirationAction::Action LocalRegion::adjustRegionExpiryAction(
   return oldValue;
 }
 
-ExpirationAction::Action LocalRegion::adjustEntryExpiryAction(
-    ExpirationAction::Action action) {
+ExpirationAction LocalRegion::adjustEntryExpiryAction(ExpirationAction action) {
   CHECK_DESTROY_PENDING(TryReadGuard, LocalRegion::adjustEntryExpiryAction);
 
  auto attrs = m_regionAttributes;
@@ -2838,7 +2837,7 @@ ExpirationAction::Action LocalRegion::adjustEntryExpiryAction(
        "entry "
        "expiry.");
   }
-  ExpirationAction::Action oldValue = getEntryExpirationAction();
+  ExpirationAction oldValue = getEntryExpirationAction();
 
   setEntryTimeToLiveExpirationAction(action);
   setEntryIdleTimeoutExpirationAction(action);
@@ -2921,7 +2920,7 @@ bool LocalRegion::isEntryIdletimeEnabled() {
   }
 }
 
-ExpirationAction::Action LocalRegion::getEntryExpirationAction() const {
+ExpirationAction LocalRegion::getEntryExpirationAction() const {
   if (m_regionAttributes->getEntryTimeToLive() > std::chrono::seconds::zero()) {
     return m_regionAttributes->getEntryTimeToLiveAction();
   } else {
@@ -2929,7 +2928,7 @@ ExpirationAction::Action LocalRegion::getEntryExpirationAction() const {
   }
 }
 
-ExpirationAction::Action LocalRegion::getRegionExpiryAction() const {
+ExpirationAction LocalRegion::getRegionExpiryAction() const {
   const auto& region_ttl = m_regionAttributes->getRegionTimeToLive();
   if (region_ttl > std::chrono::seconds::zero()) {
     return m_regionAttributes->getRegionTimeToLiveAction();
diff --git a/cppcache/src/LocalRegion.hpp b/cppcache/src/LocalRegion.hpp
index 40b776b..c6fc4db 100644
--- a/cppcache/src/LocalRegion.hpp
+++ b/cppcache/src/LocalRegion.hpp
@@ -364,10 +364,8 @@ class _GEODE_EXPORT LocalRegion : public RegionInternal {
 
   // behaviors for attributes mutator
   uint32_t adjustLruEntriesLimit(uint32_t limit) override;
-  ExpirationAction::Action adjustRegionExpiryAction(
-      ExpirationAction::Action action) override;
-  ExpirationAction::Action adjustEntryExpiryAction(
-      ExpirationAction::Action action) override;
+  ExpirationAction adjustRegionExpiryAction(ExpirationAction action) override;
+  ExpirationAction adjustEntryExpiryAction(ExpirationAction action) override;
   std::chrono::seconds adjustRegionExpiryDuration(
       const std::chrono::seconds& duration) override;
   std::chrono::seconds adjustEntryExpiryDuration(
@@ -561,8 +559,8 @@ class _GEODE_EXPORT LocalRegion : public RegionInternal {
   bool useModifiedTimeForRegionExpiry();
   bool useModifiedTimeForEntryExpiry();
   bool isEntryIdletimeEnabled();
-  ExpirationAction::Action getEntryExpirationAction() const;
-  ExpirationAction::Action getRegionExpiryAction() const;
+  ExpirationAction getEntryExpirationAction() const;
+  ExpirationAction getRegionExpiryAction() const;
   std::chrono::seconds getRegionExpiryDuration() const;
   std::chrono::seconds getEntryExpiryDuration() const;
   void invokeAfterAllEndPointDisconnected();
diff --git a/cppcache/src/RegionAttributes.cpp b/cppcache/src/RegionAttributes.cpp
index 37cc8d2..18717d9 100644
--- a/cppcache/src/RegionAttributes.cpp
+++ b/cppcache/src/RegionAttributes.cpp
@@ -221,7 +221,7 @@ std::chrono::seconds RegionAttributes::getRegionTimeToLive() const {
   return m_regionTimeToLive;
 }
 
-ExpirationAction::Action RegionAttributes::getRegionTimeToLiveAction() const {
+ExpirationAction RegionAttributes::getRegionTimeToLiveAction() const {
   return m_regionTimeToLiveExpirationAction;
 }
 
@@ -229,7 +229,7 @@ std::chrono::seconds RegionAttributes::getRegionIdleTimeout() const {
   return m_regionIdleTimeout;
 }
 
-ExpirationAction::Action RegionAttributes::getRegionIdleTimeoutAction() const {
+ExpirationAction RegionAttributes::getRegionIdleTimeoutAction() const {
   return m_regionIdleTimeoutExpirationAction;
 }
 
@@ -237,7 +237,7 @@ std::chrono::seconds RegionAttributes::getEntryTimeToLive() const {
   return m_entryTimeToLive;
 }
 
-ExpirationAction::Action RegionAttributes::getEntryTimeToLiveAction() const {
+ExpirationAction RegionAttributes::getEntryTimeToLiveAction() const {
   return m_entryTimeToLiveExpirationAction;
 }
 
@@ -245,7 +245,7 @@ std::chrono::seconds RegionAttributes::getEntryIdleTimeout() const {
   return m_entryIdleTimeout;
 }
 
-ExpirationAction::Action RegionAttributes::getEntryIdleTimeoutAction() const {
+ExpirationAction RegionAttributes::getEntryIdleTimeoutAction() const {
   return m_entryIdleTimeoutExpirationAction;
 }
 
@@ -257,7 +257,7 @@ uint8_t RegionAttributes::getConcurrencyLevel() const {
   return m_concurrencyLevel;
 }
 
-const ExpirationAction::Action RegionAttributes::getLruEvictionAction() const {
+const ExpirationAction RegionAttributes::getLruEvictionAction() const {
   return m_lruEvictionAction;
 }
 
@@ -343,22 +343,22 @@ void RegionAttributes::toData(DataOutput& out) const {
 void RegionAttributes::fromData(DataInput& in) {
   m_regionTimeToLive = std::chrono::seconds(in.readInt32());
   m_regionTimeToLiveExpirationAction =
-      static_cast<ExpirationAction::Action>(in.readInt32());
+      static_cast<ExpirationAction>(in.readInt32());
   m_regionIdleTimeout = std::chrono::seconds(in.readInt32());
   m_regionIdleTimeoutExpirationAction =
-      static_cast<ExpirationAction::Action>(in.readInt32());
+      static_cast<ExpirationAction>(in.readInt32());
   m_entryTimeToLive = std::chrono::seconds(in.readInt32());
   m_entryTimeToLiveExpirationAction =
-      static_cast<ExpirationAction::Action>(in.readInt32());
+      static_cast<ExpirationAction>(in.readInt32());
   m_entryIdleTimeout = std::chrono::seconds(in.readInt32());
   m_entryIdleTimeoutExpirationAction =
-      static_cast<ExpirationAction::Action>(in.readInt32());
+      static_cast<ExpirationAction>(in.readInt32());
   m_initialCapacity = in.readInt32();
   m_loadFactor = in.readFloat();
   m_maxValueDistLimit = in.readInt32();
   m_concurrencyLevel = in.readInt32();
   m_lruEntriesLimit = in.readInt32();
-  m_lruEvictionAction = static_cast<ExpirationAction::Action>(in.readInt32());
+  m_lruEvictionAction = static_cast<ExpirationAction>(in.readInt32());
 
   apache::geode::client::impl::readBool(in, &m_caching);
   apache::geode::client::impl::readBool(in, &m_clientNotificationEnabled);
diff --git a/cppcache/src/RegionExpiryHandler.cpp b/cppcache/src/RegionExpiryHandler.cpp
index 1499a70..1ebd5e7 100644
--- a/cppcache/src/RegionExpiryHandler.cpp
+++ b/cppcache/src/RegionExpiryHandler.cpp
@@ -31,7 +31,7 @@
 using namespace apache::geode::client;
 
 RegionExpiryHandler::RegionExpiryHandler(std::shared_ptr<RegionInternal>& rptr,
-                                         ExpirationAction::Action action,
+                                         ExpirationAction action,
                                          std::chrono::seconds duration)
     : m_regionPtr(rptr),
       m_action(action),
diff --git a/cppcache/src/RegionExpiryHandler.hpp b/cppcache/src/RegionExpiryHandler.hpp
index f3292b7..bd2a6c9 100644
--- a/cppcache/src/RegionExpiryHandler.hpp
+++ b/cppcache/src/RegionExpiryHandler.hpp
@@ -50,8 +50,7 @@ class _GEODE_EXPORT RegionExpiryHandler : public ACE_Event_Handler {
    * Constructor
    */
   RegionExpiryHandler(std::shared_ptr<RegionInternal>& rptr,
-                      ExpirationAction::Action action,
-                      std::chrono::seconds duration);
+                      ExpirationAction action, std::chrono::seconds duration);
 
   /** This handler object will be registered with the Timer Queue.
    *  When the timer expires the handle_timeout is invoked.
@@ -65,7 +64,7 @@ class _GEODE_EXPORT RegionExpiryHandler : public ACE_Event_Handler {
 
  private:
   std::shared_ptr<RegionInternal> m_regionPtr;
-  ExpirationAction::Action m_action;
+  ExpirationAction m_action;
   std::chrono::seconds m_duration;
   long m_expiryTaskId;
   // perform the actual expiration action
diff --git a/cppcache/src/RegionFactory.cpp b/cppcache/src/RegionFactory.cpp
index d4841fb..8bc3157 100644
--- a/cppcache/src/RegionFactory.cpp
+++ b/cppcache/src/RegionFactory.cpp
@@ -128,25 +128,25 @@ RegionFactory& RegionFactory::setPartitionResolver(const std::string& lib,
 }
 
 RegionFactory& RegionFactory::setEntryIdleTimeout(
-    ExpirationAction::Action action, std::chrono::seconds idleTimeout) {
+    ExpirationAction action, std::chrono::seconds idleTimeout) {
   m_attributeFactory->setEntryIdleTimeout(action, idleTimeout);
   return *this;
 }
 
 RegionFactory& RegionFactory::setEntryTimeToLive(
-    ExpirationAction::Action action, std::chrono::seconds timeToLive) {
+    ExpirationAction action, std::chrono::seconds timeToLive) {
   m_attributeFactory->setEntryTimeToLive(action, timeToLive);
   return *this;
 }
 
 RegionFactory& RegionFactory::setRegionIdleTimeout(
-    ExpirationAction::Action action, std::chrono::seconds idleTimeout) {
+    ExpirationAction action, std::chrono::seconds idleTimeout) {
   m_attributeFactory->setRegionIdleTimeout(action, idleTimeout);
   return *this;
 }
 
 RegionFactory& RegionFactory::setRegionTimeToLive(
-    ExpirationAction::Action action, std::chrono::seconds timeToLive) {
+    ExpirationAction action, std::chrono::seconds timeToLive) {
   m_attributeFactory->setRegionTimeToLive(action, timeToLive);
   return *this;
 }
diff --git a/cppcache/src/RegionInternal.cpp b/cppcache/src/RegionInternal.cpp
index 8a0d430..aa854ee 100644
--- a/cppcache/src/RegionInternal.cpp
+++ b/cppcache/src/RegionInternal.cpp
@@ -115,28 +115,28 @@ void RegionInternal::setLruEntriesLimit(uint32_t limit) {
 }
 
 void RegionInternal::setRegionTimeToLiveExpirationAction(
-    ExpirationAction::Action action) {
+    ExpirationAction action) {
   if (m_regionAttributes != nullptr) {
     m_regionAttributes->m_regionTimeToLiveExpirationAction = action;
   }
 }
 
 void RegionInternal::setRegionIdleTimeoutExpirationAction(
-    ExpirationAction::Action action) {
+    ExpirationAction action) {
   if (m_regionAttributes != nullptr) {
     m_regionAttributes->m_regionIdleTimeoutExpirationAction = action;
   }
 }
 
 void RegionInternal::setEntryTimeToLiveExpirationAction(
-    ExpirationAction::Action action) {
+    ExpirationAction action) {
   if (m_regionAttributes != nullptr) {
     m_regionAttributes->m_entryTimeToLiveExpirationAction = action;
   }
 }
 
 void RegionInternal::setEntryIdleTimeoutExpirationAction(
-    ExpirationAction::Action action) {
+    ExpirationAction action) {
   if (m_regionAttributes != nullptr) {
     m_regionAttributes->m_entryIdleTimeoutExpirationAction = action;
   }
diff --git a/cppcache/src/RegionInternal.hpp b/cppcache/src/RegionInternal.hpp
index 17e92cd..94a0ce3 100644
--- a/cppcache/src/RegionInternal.hpp
+++ b/cppcache/src/RegionInternal.hpp
@@ -240,10 +240,9 @@ class RegionInternal : public Region {
   virtual void releaseReadLock() = 0;
   // behaviors for attributes mutator
   virtual uint32_t adjustLruEntriesLimit(uint32_t limit) = 0;
-  virtual ExpirationAction::Action adjustRegionExpiryAction(
-      ExpirationAction::Action action) = 0;
-  virtual ExpirationAction::Action adjustEntryExpiryAction(
-      ExpirationAction::Action action) = 0;
+  virtual ExpirationAction adjustRegionExpiryAction(
+      ExpirationAction action) = 0;
+  virtual ExpirationAction adjustEntryExpiryAction(ExpirationAction action) = 0;
   virtual std::chrono::seconds adjustRegionExpiryDuration(
       const std::chrono::seconds& duration) = 0;
   virtual std::chrono::seconds adjustEntryExpiryDuration(
@@ -296,10 +295,10 @@ class RegionInternal : public Region {
   RegionInternal(Cache* cache, const std::shared_ptr<RegionAttributes>& attributes);
 
   void setLruEntriesLimit(uint32_t limit);
-  void setRegionTimeToLiveExpirationAction(ExpirationAction::Action action);
-  void setRegionIdleTimeoutExpirationAction(ExpirationAction::Action action);
-  void setEntryTimeToLiveExpirationAction(ExpirationAction::Action action);
-  void setEntryIdleTimeoutExpirationAction(ExpirationAction::Action action);
+  void setRegionTimeToLiveExpirationAction(ExpirationAction action);
+  void setRegionIdleTimeoutExpirationAction(ExpirationAction action);
+  void setEntryTimeToLiveExpirationAction(ExpirationAction action);
+  void setEntryIdleTimeoutExpirationAction(ExpirationAction action);
   void setRegionTimeToLive(const std::chrono::seconds& duration);
   void setRegionIdleTimeout(const std::chrono::seconds& duration);
   void setEntryTimeToLive(const std::chrono::seconds& duration);
diff --git a/cppcache/test/ExpirationActionTest.cpp b/cppcache/test/ExpirationActionTest.cpp
deleted file mode 100644
index b47fe1e..0000000
--- a/cppcache/test/ExpirationActionTest.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <gtest/gtest.h>
-
-#include <geode/ExpirationAction.hpp>
-
-using namespace apache::geode::client;
-
-TEST(ExpirationActionTest, VerifyOrdinalAndNameSymmetryForInvalidate) {
-  auto&& name = ExpirationAction::fromOrdinal(0);
-  EXPECT_EQ("INVALIDATE", name) << "Correct name for invalidate";
-  auto&& action = ExpirationAction::fromName(name);
-  EXPECT_EQ(ExpirationAction::INVALIDATE, action)
-      << "Correct action for invalidate";
-}
-
-TEST(ExpirationActionTest, VerifyOrdinalAndNameSymmetryForLocalInvalidate) {
-  auto&& name = ExpirationAction::fromOrdinal(1);
-  EXPECT_EQ("LOCAL_INVALIDATE", name) << "Correct name for local invalidate";
-  auto&& action = ExpirationAction::fromName(name);
-  EXPECT_EQ(ExpirationAction::LOCAL_INVALIDATE, action)
-      << "Correct action for local invalidate";
-}
-
-TEST(ExpirationActionTest, VerifyOrdinalAndNameSymmetryForDestroy) {
-  auto&& name = ExpirationAction::fromOrdinal(2);
-  EXPECT_EQ("DESTROY", name) << "Correct name for destroy";
-  auto&& action = ExpirationAction::fromName(name);
-  EXPECT_EQ(ExpirationAction::DESTROY, action) << "Correct action for destroy";
-}
-
-TEST(ExpirationActionTest, VerifyOrdinalAndNameSymmetryForLocalDestroy) {
-  auto&& name = ExpirationAction::fromOrdinal(3);
-  EXPECT_EQ("LOCAL_DESTROY", name) << "Correct name for local destroy";
-  auto&& action = ExpirationAction::fromName(name);
-  EXPECT_EQ(ExpirationAction::LOCAL_DESTROY, action)
-      << "Correct action for local destroy";
-}
-
-TEST(ExpirationActionTest, ValidateIsInvalidate) {
-  EXPECT_EQ(true, ExpirationAction::isInvalidate(ExpirationAction::INVALIDATE))
-      << "INVALIDATE is invalidate";
-  EXPECT_EQ(false,
-            ExpirationAction::isInvalidate(ExpirationAction::LOCAL_INVALIDATE))
-      << "LOCAL_INVALIDATE is not invalidate";
-  EXPECT_EQ(false, ExpirationAction::isInvalidate(ExpirationAction::DESTROY))
-      << "DESTROY is not invalidate";
-  EXPECT_EQ(false,
-            ExpirationAction::isInvalidate(ExpirationAction::LOCAL_DESTROY))
-      << "LOCAL_DESTROY is not invalidate";
-  EXPECT_EQ(false,
-            ExpirationAction::isInvalidate(ExpirationAction::INVALID_ACTION))
-      << "INVALID_ACTION is not invalidate";
-}
-
-TEST(ExpirationActionTest, ValidateIsLocalInvalidate) {
-  EXPECT_EQ(false,
-            ExpirationAction::isLocalInvalidate(ExpirationAction::INVALIDATE))
-      << "INVALIDATE is not local invalidate";
-  EXPECT_EQ(true, ExpirationAction::isLocalInvalidate(
-                      ExpirationAction::LOCAL_INVALIDATE))
-      << "LOCAL_INVALIDATE is local invalidate";
-  EXPECT_EQ(false,
-            ExpirationAction::isLocalInvalidate(ExpirationAction::DESTROY))
-      << "DESTROY is not local invalidate";
-  EXPECT_EQ(false, ExpirationAction::isLocalInvalidate(
-                       ExpirationAction::LOCAL_DESTROY))
-      << "LOCAL_DESTROY is not local invalidate";
-  EXPECT_EQ(false, ExpirationAction::isLocalInvalidate(
-                       ExpirationAction::INVALID_ACTION))
-      << "INVALID_ACTION is not local invalidate";
-}
-
-TEST(ExpirationActionTest, ValidateIsDestroy) {
-  EXPECT_EQ(false, ExpirationAction::isDestroy(ExpirationAction::INVALIDATE))
-      << "INVALIDATE is not destroy";
-  EXPECT_EQ(false,
-            ExpirationAction::isDestroy(ExpirationAction::LOCAL_INVALIDATE))
-      << "LOCAL_INVALIDATE is not destroy";
-  EXPECT_EQ(true, ExpirationAction::isDestroy(ExpirationAction::DESTROY))
-      << "DESTROY is destroy";
-  EXPECT_EQ(false, ExpirationAction::isDestroy(ExpirationAction::LOCAL_DESTROY))
-      << "LOCAL_DESTROY is not destroy";
-  EXPECT_EQ(false,
-            ExpirationAction::isDestroy(ExpirationAction::INVALID_ACTION))
-      << "INVALID_ACTION is not destroy";
-}
-
-TEST(ExpirationActionTest, ValidateIsLocalDestroy) {
-  EXPECT_EQ(false,
-            ExpirationAction::isLocalDestroy(ExpirationAction::INVALIDATE))
-      << "INVALIDATE is not local destroy";
-  EXPECT_EQ(false, ExpirationAction::isLocalDestroy(
-                       ExpirationAction::LOCAL_INVALIDATE))
-      << "LOCAL_INVALIDATE is not local destroy";
-  EXPECT_EQ(false, ExpirationAction::isLocalDestroy(ExpirationAction::DESTROY))
-      << "DESTROY is not local destroy";
-  EXPECT_EQ(true,
-            ExpirationAction::isLocalDestroy(ExpirationAction::LOCAL_DESTROY))
-      << "LOCAL_DESTROY is local destroy";
-  EXPECT_EQ(false,
-            ExpirationAction::isLocalDestroy(ExpirationAction::INVALID_ACTION))
-      << "INVALID_ACTION is not local destroy";
-}
-
-TEST(ExpirationActionTest, ValidateIsLocal) {
-  EXPECT_EQ(false, ExpirationAction::isLocal(ExpirationAction::INVALIDATE))
-      << "INVALIDATE is not local";
-  EXPECT_EQ(true, ExpirationAction::isLocal(ExpirationAction::LOCAL_INVALIDATE))
-      << "LOCAL_INVALIDATE is local";
-  EXPECT_EQ(false, ExpirationAction::isLocal(ExpirationAction::DESTROY))
-      << "DESTROY is not local";
-  EXPECT_EQ(true, ExpirationAction::isLocal(ExpirationAction::LOCAL_DESTROY))
-      << "LOCAL_DESTROY is local";
-  EXPECT_EQ(false, ExpirationAction::isLocal(ExpirationAction::INVALID_ACTION))
-      << "INVALID_ACTION is not local";
-}
-
-TEST(ExpirationActionTest, ValidateIsDistributed) {
-  EXPECT_EQ(true, ExpirationAction::isDistributed(ExpirationAction::INVALIDATE))
-      << "INVALIDATE is distributed";
-  EXPECT_EQ(false,
-            ExpirationAction::isDistributed(ExpirationAction::LOCAL_INVALIDATE))
-      << "LOCAL_INVALIDATE is not distributed";
-  EXPECT_EQ(true, ExpirationAction::isDistributed(ExpirationAction::DESTROY))
-      << "DESTROY is distributed";
-  EXPECT_EQ(false,
-            ExpirationAction::isDistributed(ExpirationAction::LOCAL_DESTROY))
-      << "LOCAL_DESTROY is not distributed";
-  EXPECT_EQ(false,
-            ExpirationAction::isDistributed(ExpirationAction::INVALID_ACTION))
-      << "INVALID_ACTION is not distributed";
-}
diff --git a/tests/cpp/fwklib/FwkObjects.hpp b/tests/cpp/fwklib/FwkObjects.hpp
index a941a6b..f31f1ee 100644
--- a/tests/cpp/fwklib/FwkObjects.hpp
+++ b/tests/cpp/fwklib/FwkObjects.hpp
@@ -313,7 +313,7 @@ class ActionPair {
 
 class ExpiryAttributes {
   std::chrono::seconds m_timeout;
-  ExpirationAction::Action m_action;
+  ExpirationAction m_action;
 
   // TODO GEODE-3136: Consider parser
   void setTimeout(std::string str) {
@@ -335,7 +335,7 @@ class ExpiryAttributes {
  public:
   ExpiryAttributes(const DOMNode* node);
 
-  ExpirationAction::Action getAction() { return m_action; }
+  ExpirationAction getAction() { return m_action; }
   std::chrono::seconds getTimeout() { return m_timeout; }
 };
 
diff --git a/tests/cpp/fwklib/RegionHelper.hpp b/tests/cpp/fwklib/RegionHelper.hpp
index 89f8aa7..11031f8 100644
--- a/tests/cpp/fwklib/RegionHelper.hpp
+++ b/tests/cpp/fwklib/RegionHelper.hpp
@@ -36,15 +36,13 @@ namespace geode {
 namespace client {
 namespace testframework {
 
-using namespace apache::geode::internal::chrono::duration;
-
 // ----------------------------------------------------------------------------
 
 /** @class RegionHelper
-  * @brief Class used to define a valid combination of attributes and
-  * specifications for a region. Since some combinations are illegal,
-  * this gives a test an easier way to consider all valid combinations.
-  */
+ * @brief Class used to define a valid combination of attributes and
+ * specifications for a region. Since some combinations are illegal,
+ * this gives a test an easier way to consider all valid combinations.
+ */
 class RegionHelper {
   const FwkRegion* m_region;
   std::string m_spec;
@@ -85,10 +83,25 @@ class RegionHelper {
     return sString;
   }
 
+  static std::string to_string(ExpirationAction expirationAction) {
+    switch (expirationAction) {
+      case ExpirationAction::DESTROY:
+        return "DESTROY";
+      case ExpirationAction::INVALIDATE:
+        return "INVALIDATE";
+      case ExpirationAction::LOCAL_INVALIDATE:
+        return "LOCAL_INVALIDATE";
+      case ExpirationAction::LOCAL_DESTROY:
+        return "LOCAL_DESTROY";
+      case ExpirationAction::INVALID_ACTION:
+        return "INVALID_ACTION";
+    }
+  }
+
   /** @brief Given RegionAttributes, return a string logging its configuration.
-    *  @param attr Return a string describing this region.
-    *  @retval A String representing aRegion.
-    */
+   *  @param attr Return a string describing this region.
+   *  @retval A String representing aRegion.
+   */
   static std::string regionAttributesToString(
       std::shared_ptr<RegionAttributes>& attr) {
     std::string sString;
@@ -108,24 +121,27 @@ class RegionHelper {
     sString += "\nlruEntriesLimit: ";
     sString += std::to_string(attr->getLruEntriesLimit());
     sString += "\nlruEvictionAction: ";
-    sString += ExpirationAction::fromOrdinal(attr->getLruEvictionAction());
+    sString += to_string(attr->getLruEvictionAction());
     sString += "\nentryTimeToLive: ";
-    sString += to_string(attr->getEntryTimeToLive());
+    sString += apache::geode::internal::chrono::duration::to_string(
+        attr->getEntryTimeToLive());
     sString += "\nentryTimeToLiveAction: ";
-    sString += ExpirationAction::fromOrdinal(attr->getEntryTimeToLiveAction());
+    sString += to_string(attr->getEntryTimeToLiveAction());
     sString += "\nentryIdleTimeout: ";
-    sString += to_string(attr->getEntryIdleTimeout());
+    sString += apache::geode::internal::chrono::duration::to_string(
+        attr->getEntryIdleTimeout());
     sString += "\nentryIdleTimeoutAction: ";
-    sString += ExpirationAction::fromOrdinal(attr->getEntryIdleTimeoutAction());
+    sString += to_string(attr->getEntryIdleTimeoutAction());
     sString += "\nregionTimeToLive: ";
-    sString += to_string(attr->getRegionTimeToLive());
+    sString += apache::geode::internal::chrono::duration::to_string(
+        attr->getRegionTimeToLive());
     sString += "\nregionTimeToLiveAction: ";
-    sString += ExpirationAction::fromOrdinal(attr->getRegionTimeToLiveAction());
+    sString += to_string(attr->getRegionTimeToLiveAction());
     sString += "\nregionIdleTimeout: ";
-    sString += to_string(attr->getRegionIdleTimeout());
+    sString += apache::geode::internal::chrono::duration::to_string(
+        attr->getRegionIdleTimeout());
     sString += "\nregionIdleTimeoutAction: ";
-    sString +=
-        ExpirationAction::fromOrdinal(attr->getRegionIdleTimeoutAction());
+    sString += to_string(attr->getRegionIdleTimeoutAction());
     sString += "\npoolName: ";
     sString += attr->getPoolName();
     sString += "\nCacheLoader: ";

-- 
To stop receiving notification emails like this one, please contact
jbarrett@apache.org.

Mime
View raw message