Browse Source

[2851] additional cleanup: rename ReloadResult "CacheStatus"

as we don't use the term "reload" anymore.
JINMEI Tatuya 12 years ago
parent
commit
73e1a3cf89
2 changed files with 11 additions and 10 deletions
  1. 9 8
      src/lib/datasrc/client_list.h
  2. 2 2
      src/lib/datasrc/tests/client_list_unittest.cc

+ 9 - 8
src/lib/datasrc/client_list.h

@@ -339,8 +339,14 @@ public:
         return (configuration_);
     }
 
-    /// \brief Result of the getCachedZoneWriter() method.
-    enum ReloadResult {
+private:
+    /// \brief Convenience type shortcut
+    typedef boost::shared_ptr<memory::ZoneWriter> ZoneWriterPtr;
+public:
+    /// \brief Codes indicating in-memory cache status for a given zone name.
+    ///
+    /// This is used as a result of the getCachedZoneWriter() method.
+    enum CacheStatus {
         CACHE_DISABLED,     ///< The cache is not enabled in this list.
         ZONE_NOT_CACHED,    ///< Zone is served directly, not from cache
                             ///  (including the case cache is disabled for
@@ -350,16 +356,11 @@ public:
                             ///  the writer provided.
     };
 
-private:
-    /// \brief Convenience type shortcut
-    typedef boost::shared_ptr<memory::ZoneWriter> ZoneWriterPtr;
-public:
-
     /// \brief Return value of getCachedZoneWriter()
     ///
     /// A pair containing status and the zone writer, for the
     /// getCachedZoneWriter() method.
-    typedef std::pair<ReloadResult, ZoneWriterPtr> ZoneWriterPair;
+    typedef std::pair<CacheStatus, ZoneWriterPtr> ZoneWriterPair;
 
     /// \brief Return a zone writer that can be used to reload a zone.
     ///

+ 2 - 2
src/lib/datasrc/tests/client_list_unittest.cc

@@ -250,7 +250,7 @@ public:
         EXPECT_EQ(cache, list_->getDataSources()[index].cache_ !=
                   shared_ptr<InMemoryClient>());
     }
-    ConfigurableClientList::ReloadResult doReload(const Name& origin);
+    ConfigurableClientList::CacheStatus doReload(const Name& origin);
     const RRClass rrclass_;
     shared_ptr<TestedList> list_;
     const ClientList::FindResult negative_result_;
@@ -830,7 +830,7 @@ TEST_F(ListTest, BadMasterFile) {
                    true);
 }
 
-ConfigurableClientList::ReloadResult
+ConfigurableClientList::CacheStatus
 ListTest::doReload(const Name& origin) {
     ConfigurableClientList::ZoneWriterPair
         result(list_->getCachedZoneWriter(origin));