From: JINMEI Tatuya Date: Wed, 1 May 2013 22:54:59 +0000 (-0700) Subject: [2851] additional cleanup: rename ReloadResult "CacheStatus" X-Git-Tag: bind10-1.2.0beta1-release~466^2~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=73e1a3cf8920bfb4e7cd8f7672b3f82600f2766f;p=thirdparty%2Fkea.git [2851] additional cleanup: rename ReloadResult "CacheStatus" as we don't use the term "reload" anymore. --- diff --git a/src/lib/datasrc/client_list.h b/src/lib/datasrc/client_list.h index 5885ae8139..912bed3871 100644 --- a/src/lib/datasrc/client_list.h +++ b/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 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 ZoneWriterPtr; -public: - /// \brief Return value of getCachedZoneWriter() /// /// A pair containing status and the zone writer, for the /// getCachedZoneWriter() method. - typedef std::pair ZoneWriterPair; + typedef std::pair ZoneWriterPair; /// \brief Return a zone writer that can be used to reload a zone. /// diff --git a/src/lib/datasrc/tests/client_list_unittest.cc b/src/lib/datasrc/tests/client_list_unittest.cc index ad2c69dc6d..818805c004 100644 --- a/src/lib/datasrc/tests/client_list_unittest.cc +++ b/src/lib/datasrc/tests/client_list_unittest.cc @@ -250,7 +250,7 @@ public: EXPECT_EQ(cache, list_->getDataSources()[index].cache_ != shared_ptr()); } - ConfigurableClientList::ReloadResult doReload(const Name& origin); + ConfigurableClientList::CacheStatus doReload(const Name& origin); const RRClass rrclass_; shared_ptr 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));