susumu.yata
null+****@clear*****
Fri Aug 16 17:24:20 JST 2013
susumu.yata 2013-08-16 17:24:20 +0900 (Fri, 16 Aug 2013) New Revision: 07fc2205b7cc27723bcdcebb8c5ee71fa2caa0bc https://github.com/groonga/grnxx/commit/07fc2205b7cc27723bcdcebb8c5ee71fa2caa0bc Message: Add a skeleton of sweep(). Modified files: lib/grnxx/map/pool.cpp lib/grnxx/map/pool.hpp Modified: lib/grnxx/map/pool.cpp (+9 -0) =================================================================== --- lib/grnxx/map/pool.cpp 2013-08-15 20:43:24 +0900 (9dfd533) +++ lib/grnxx/map/pool.cpp 2013-08-16 17:24:20 +0900 (6157cdd) @@ -184,6 +184,11 @@ void Pool<T>::defrag() { } template <typename T> +void Pool<T>::sweep(Duration lifetime) { + // TODO +} + +template <typename T> void Pool<T>::create_pool(Storage *storage, uint32_t storage_node_id) { storage_ = storage; StorageNode header_node = @@ -500,6 +505,10 @@ void Pool<Bytes>::defrag() { // TODO } +void Pool<Bytes>::sweep(Duration lifetime) { + // TODO +} + void Pool<Bytes>::create_pool(Storage *storage, uint32_t storage_node_id) { storage_ = storage; const uint64_t header_node_size = sizeof(Header) + sizeof(TableEntry); Modified: lib/grnxx/map/pool.hpp (+3 -0) =================================================================== --- lib/grnxx/map/pool.hpp 2013-08-15 20:43:24 +0900 (92e6e77) +++ lib/grnxx/map/pool.hpp 2013-08-16 17:24:20 +0900 (3d628ad) @@ -24,6 +24,7 @@ #include <queue> #include "grnxx/bytes.hpp" +#include "grnxx/duration.hpp" #include "grnxx/mutex.hpp" #include "grnxx/traits.hpp" #include "grnxx/types.hpp" @@ -134,6 +135,7 @@ class Pool { int64_t add(KeyArg key); void defrag(); + void sweep(Duration lifetime); private: Storage *storage_; @@ -259,6 +261,7 @@ class Pool<Bytes> { int64_t add(KeyArg key); void defrag(); + void sweep(Duration lifetime); private: Storage *storage_; -------------- next part -------------- HTML����������������������������... Download