]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2851] additional cleanup: rename ReloadResult "CacheStatus"
authorJINMEI Tatuya <jinmei@isc.org>
Wed, 1 May 2013 22:54:59 +0000 (15:54 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Sat, 4 May 2013 06:39:06 +0000 (23:39 -0700)
as we don't use the term "reload" anymore.

src/lib/datasrc/client_list.h
src/lib/datasrc/tests/client_list_unittest.cc

index 5885ae813914ae7522205788bf15a089103ce2dd..912bed387198f5b6d6100a31ad0f08e8baf33be6 100644 (file)
@@ -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.
     ///
index ad2c69dc6d8a5a577063c48d00c450a8cf88df58..818805c004f16e96c34d44aa25584611230b1b56 100644 (file)
@@ -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));