diff options
Diffstat (limited to 's/d_logic.cpp')
-rw-r--r-- | s/d_logic.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/s/d_logic.cpp b/s/d_logic.cpp index e0b413c6551..73e489c1e1d 100644 --- a/s/d_logic.cpp +++ b/s/d_logic.cpp @@ -71,7 +71,7 @@ namespace mongo { public: MongodShardCommand( const char * n ) : Command( n ){ } - virtual bool slaveOk(){ + virtual bool slaveOk() const { return false; } virtual bool adminOnly() { @@ -81,7 +81,7 @@ namespace mongo { class WriteBackCommand : public MongodShardCommand { public: - virtual LockType locktype(){ return NONE; } + virtual LockType locktype() const { return NONE; } WriteBackCommand() : MongodShardCommand( "writebacklisten" ){} bool run(const char *cmdns, BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool){ @@ -115,7 +115,7 @@ namespace mongo { help << " example: { setShardVersion : 'alleyinsider.foo' , version : 1 , configdb : '' } "; } - virtual LockType locktype(){ return WRITE; } // TODO: figure out how to make this not need to lock + virtual LockType locktype() const { return WRITE; } // TODO: figure out how to make this not need to lock bool run(const char *cmdns, BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool){ @@ -250,7 +250,7 @@ namespace mongo { help << " example: { getShardVersion : 'alleyinsider.foo' } "; } - virtual LockType locktype(){ return WRITE; } // TODO: figure out how to make this not need to lock + virtual LockType locktype() const { return WRITE; } // TODO: figure out how to make this not need to lock bool run(const char *cmdns, BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool){ string ns = cmdObj["getShardVersion"].valuestrsafe(); @@ -279,7 +279,7 @@ namespace mongo { help << "should not be calling this directly" << endl; } - virtual LockType locktype(){ return WRITE; } + virtual LockType locktype() const { return WRITE; } bool run(const char *cmdns, BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool){ // so i have to start clone, tell caller its ok to make change @@ -350,7 +350,7 @@ namespace mongo { help << "should not be calling this directly" << endl; } - virtual LockType locktype(){ return WRITE; } + virtual LockType locktype() const { return WRITE; } bool run(const char *cmdns, BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool){ // see MoveShardStartCommand::run |