5 #ifndef ctrlplane_db_table_walker_h
6 #define ctrlplane_db_table_walker_h
8 #include <boost/function.hpp>
9 #include <boost/dynamic_bitset.hpp>
26 typedef boost::function<bool(DBTablePartBase *, DBEntryBase *)>
WalkFn;
43 bool postpone_walk =
false);
60 static bool init_ =
false;
65 char *count_str = getenv(
"DB_ITERATION_TO_YIELD");
std::vector< Walker * > WalkerList
static int GetIterationToYield()
DBTableWalker(int task_id=-1)
void PurgeWalker(WalkId id)
tbb::mutex walkers_mutex_
boost::function< bool(DBTablePartBase *, DBEntryBase *)> WalkFn
static int max_iteration_to_yield_
static void SetIterationToYield(int count)
void WalkCancel(WalkId id)
static const int kIterationToYield
void WalkResume(WalkId id)
WalkId WalkTable(DBTable *table, const DBRequestKey *key_start, WalkFn walker, WalkCompleteFn walk_complete, bool postpone_walk=false)
boost::function< void(DBTableBase *)> WalkCompleteFn
static const WalkId kInvalidWalkerId
boost::dynamic_bitset WalkerMap