diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-04-22 13:34:53 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-04-22 13:34:53 -0400 |
commit | be37180c5d08bf27a9d45123c0e88a825ce2b4a9 (patch) | |
tree | cd5fd232fc479ca257139c5e0ea6982ed4b37daf /s/balance.h | |
parent | 7486cca9e7443540f0ac5ed57f4ff5fdbc1735f3 (diff) | |
download | mongo-be37180c5d08bf27a9d45123c0e88a825ce2b4a9.tar.gz |
auto balance checkpoint SERVER-945
Diffstat (limited to 's/balance.h')
-rw-r--r-- | s/balance.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/s/balance.h b/s/balance.h new file mode 100644 index 00000000000..1204ab2d8af --- /dev/null +++ b/s/balance.h @@ -0,0 +1,41 @@ +// balance.h + +/** +* Copyright (C) 2008 10gen Inc. +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License, version 3, +* as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Affero General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "../stdafx.h" +#include "../util/background.h" +#include "../client/dbclient.h" + +namespace mongo { + + class Balancer : public BackgroundJob { + public: + Balancer(); + + void run(); + + private: + bool shouldIBalance( DBClientBase& conn ); + + string _myid; + time_t _started; + }; + + extern Balancer balancer; +} |