From 5f6aa4f67d9bf3bd6a4345db2af9c76647b677d2 Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Fri, 20 Feb 2009 10:46:42 -0500 Subject: insert shard checkpoint --- s/request.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 's/request.h') diff --git a/s/request.h b/s/request.h index f251fbf1cad..0070cc5041c 100644 --- a/s/request.h +++ b/s/request.h @@ -9,7 +9,7 @@ namespace mongo { - class Request { + class Request : boost::noncopyable { public: Request( Message& m, MessagingPort& p ); @@ -34,6 +34,10 @@ namespace mongo { return _config; } + ShardInfo * getShardInfo(){ + return _shardInfo; + } + // ---- remote location info ----- @@ -67,12 +71,17 @@ namespace mongo { class Strategy { public: + Strategy(){} virtual ~Strategy() {} virtual void queryOp( Request& r ) = 0; virtual void getMore( Request& r ) = 0; virtual void writeOp( int op , Request& r ) = 0; + + protected: + void doWrite( int op , Request& r , string server ); + void insert( string server , const char * ns , const BSONObj& obj ); }; extern Strategy * SINGLE; - extern Strategy * RANDOM; + extern Strategy * SHARDED; } -- cgit v1.2.1