| dbclient_rs.h | | dbclient_rs.h | |
| | | | |
| skipping to change at line 619 | | skipping to change at line 619 | |
| int _retries; | | int _retries; | |
| | | | |
| } _lazyState; | | } _lazyState; | |
| | | | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * A simple object for representing the list of tags. The initial state
will | | * A simple object for representing the list of tags. The initial state
will | |
| * have a valid current tag as long as the list is not empty. | | * have a valid current tag as long as the list is not empty. | |
| */ | | */ | |
|
| class TagSet : public boost::noncopyable { // because of BSONArrayItera
torSorted | | class TagSet { | |
| public: | | public: | |
| /** | | /** | |
| * Creates an empty tag list that is initially exhausted. | | * Creates an empty tag list that is initially exhausted. | |
| */ | | */ | |
| TagSet(); | | TagSet(); | |
| | | | |
| /** | | /** | |
|
| | | * Creates a copy of the given TagSet. The new copy will have the | |
| | | * iterator pointing at the initial position. | |
| | | */ | |
| | | explicit TagSet(const TagSet& other); | |
| | | | |
| | | /** | |
| * Creates a tag set object that lazily iterates over the tag list. | | * Creates a tag set object that lazily iterates over the tag list. | |
| * | | * | |
| * @param tags the list of tags associated with this option. This o
bject | | * @param tags the list of tags associated with this option. This o
bject | |
| * will get a shared copy of the list. Therefore, it is importa
nt | | * will get a shared copy of the list. Therefore, it is importa
nt | |
| * for the the given tag to live longer than the created tag se
t. | | * for the the given tag to live longer than the created tag se
t. | |
| */ | | */ | |
| explicit TagSet(const BSONArray& tags); | | explicit TagSet(const BSONArray& tags); | |
| | | | |
| /** | | /** | |
| * Advance to the next tag. | | * Advance to the next tag. | |
| | | | |
| skipping to change at line 663 | | skipping to change at line 669 | |
| */ | | */ | |
| bool isExhausted() const; | | bool isExhausted() const; | |
| | | | |
| /** | | /** | |
| * @return an unordered iterator to the tag list. The caller is res
ponsible for | | * @return an unordered iterator to the tag list. The caller is res
ponsible for | |
| * destroying the returned iterator. | | * destroying the returned iterator. | |
| */ | | */ | |
| BSONObjIterator* getIterator() const; | | BSONObjIterator* getIterator() const; | |
| | | | |
| /** | | /** | |
|
| * Create a new copy of this tag set and wuth the iterator pointing | | | |
| at the | | | |
| * head. | | | |
| */ | | | |
| TagSet* clone() const; | | | |
| | | | |
| /** | | | |
| * @returns true if the other TagSet has the same tag set specifica
tion with | | * @returns true if the other TagSet has the same tag set specifica
tion with | |
| * this tag set, disregarding where the current iterator is poi
nting to. | | * this tag set, disregarding where the current iterator is poi
nting to. | |
| */ | | */ | |
| bool equals(const TagSet& other) const; | | bool equals(const TagSet& other) const; | |
| | | | |
| private: | | private: | |
|
| | | /** | |
| | | * This is purposely undefined as the semantics for assignment can | |
| | | be | |
| | | * confusing. This is because BSONArrayIteratorSorted shouldn't be | |
| | | * copied (because of how it manages internal buffer). | |
| | | */ | |
| | | TagSet& operator=(const TagSet& other); | |
| BSONObj _currentTag; | | BSONObj _currentTag; | |
| bool _isExhausted; | | bool _isExhausted; | |
| | | | |
| // Important: do not re-order _tags & _tagIterator | | // Important: do not re-order _tags & _tagIterator | |
| BSONArray _tags; | | BSONArray _tags; | |
| BSONArrayIteratorSorted _tagIterator; | | BSONArrayIteratorSorted _tagIterator; | |
| }; | | }; | |
| | | | |
| struct ReadPreferenceSetting { | | struct ReadPreferenceSetting { | |
| /** | | /** | |
|
| * @param tag cannot be NULL. | | * @parm pref the read preference mode. | |
| | | * @param tag the tag set. Note that this object will have the | |
| | | * tag set will have this in a reset state (meaning, this | |
| | | * object's copy of tag will have the iterator in the initial | |
| | | * position). | |
| */ | | */ | |
|
| ReadPreferenceSetting(ReadPreference pref, TagSet* tag): | | ReadPreferenceSetting(ReadPreference pref, const TagSet& tag): | |
| pref(pref), tags(tag->clone()) { | | pref(pref), tags(tag) { | |
| } | | | |
| | | | |
| ~ReadPreferenceSetting() { | | | |
| delete tags; | | | |
| } | | } | |
| | | | |
| inline bool equals(const ReadPreferenceSetting& other) const { | | inline bool equals(const ReadPreferenceSetting& other) const { | |
|
| return pref == other.pref && tags->equals(*other.tags); | | return pref == other.pref && tags.equals(other.tags); | |
| } | | } | |
| | | | |
| const ReadPreference pref; | | const ReadPreference pref; | |
|
| | | TagSet tags; | |
| /** | | | |
| * Note: This object owns this memory. | | | |
| */ | | | |
| TagSet* tags; | | | |
| }; | | }; | |
| } | | } | |
| | | | |
End of changes. 8 change blocks. |
| 21 lines changed or deleted | | 23 lines changed or added | |
|
| distlock.h | | distlock.h | |
| | | | |
| skipping to change at line 126 | | skipping to change at line 126 | |
| /** | | /** | |
| * Attempts to acquire 'this' lock, checking if it could or should
be stolen from the previous holder. Please | | * Attempts to acquire 'this' lock, checking if it could or should
be stolen from the previous holder. Please | |
| * consider using the dist_lock_try construct to acquire this lock
in an exception safe way. | | * consider using the dist_lock_try construct to acquire this lock
in an exception safe way. | |
| * | | * | |
| * @param why human readable description of why the lock is being t
aken (used to log) | | * @param why human readable description of why the lock is being t
aken (used to log) | |
| * @param whether this is a lock re-entry or a new lock | | * @param whether this is a lock re-entry or a new lock | |
| * @param other configdb's lock document that is currently holding
the lock, if lock is taken, or our own lock | | * @param other configdb's lock document that is currently holding
the lock, if lock is taken, or our own lock | |
| * details if not | | * details if not | |
| * @return true if it managed to grab the lock | | * @return true if it managed to grab the lock | |
| */ | | */ | |
|
| bool lock_try( const string& why , bool reenter = false, BSONObj * | | bool lock_try( const string& why , bool reenter = false, BSONObj * | |
| other = 0 ); | | other = 0, double timeout = 0.0 ); | |
| | | | |
| | | /** | |
| | | * Returns true if we currently believe we hold this lock and it wa | |
| | | s possible to | |
| | | * confirm that, within 'timeout' seconds, if provided, with the co | |
| | | nfig servers. If the | |
| | | * lock is not held or if we failed to contact the config servers w | |
| | | ithin the timeout, | |
| | | * returns false. | |
| | | */ | |
| | | bool isLockHeld( double timeout, string* errMsg ); | |
| | | | |
| /** | | /** | |
| * Releases a previously taken lock. | | * Releases a previously taken lock. | |
| */ | | */ | |
| void unlock( BSONObj* oldLockPtr = NULL ); | | void unlock( BSONObj* oldLockPtr = NULL ); | |
| | | | |
| Date_t getRemoteTime(); | | Date_t getRemoteTime(); | |
| | | | |
| bool isRemoteTimeSkewed(); | | bool isRemoteTimeSkewed(); | |
| | | | |
| | | | |
| skipping to change at line 225 | | skipping to change at line 233 | |
| | | | |
| // Make sure the lock ownership passes to this object, | | // Make sure the lock ownership passes to this object, | |
| // so we only unlock once. | | // so we only unlock once. | |
| ((dist_lock_try&) that)._got = false; | | ((dist_lock_try&) that)._got = false; | |
| ((dist_lock_try&) that)._lock = NULL; | | ((dist_lock_try&) that)._lock = NULL; | |
| ((dist_lock_try&) that)._other = BSONObj(); | | ((dist_lock_try&) that)._other = BSONObj(); | |
| | | | |
| return *this; | | return *this; | |
| } | | } | |
| | | | |
|
| dist_lock_try( DistributedLock * lock , const std::string& why ) | | dist_lock_try( DistributedLock * lock , const std::string& why, dou
ble timeout = 0.0 ) | |
| : _lock(lock), _why(why) { | | : _lock(lock), _why(why) { | |
|
| _got = _lock->lock_try( why , false , &_other ); | | _got = _lock->lock_try( why , false , &_other, timeout ); | |
| } | | } | |
| | | | |
| ~dist_lock_try() { | | ~dist_lock_try() { | |
| if ( _got ) { | | if ( _got ) { | |
| verify( ! _other.isEmpty() ); | | verify( ! _other.isEmpty() ); | |
| _lock->unlock( &_other ); | | _lock->unlock( &_other ); | |
| } | | } | |
| } | | } | |
| | | | |
|
| bool reestablish(){ | | /** | |
| return retry(); | | * Returns false if the lock is known _not_ to be held, otherwise a | |
| } | | sks the underlying | |
| | | * lock to issue a 'isLockHeld' call and returns whatever that call | |
| | | s does. | |
| | | */ | |
| | | bool isLockHeld( double timeout, string* errMsg) { | |
| | | if ( !_lock ) { | |
| | | *errMsg = "Lock is not currently set up"; | |
| | | return false; | |
| | | } | |
| | | | |
|
| bool retry() { | | if ( !_got ) { | |
| verify( _lock ); | | *errMsg = str::stream() << "Lock " << _lock->_name << " is | |
| verify( _got ); | | currently held by " | |
| verify( ! _other.isEmpty() ); | | << _other; | |
| | | return false; | |
| | | } | |
| | | | |
|
| return _got = _lock->lock_try( _why , true, &_other ); | | return _lock->isLockHeld( timeout, errMsg ); | |
| } | | } | |
| | | | |
| bool got() const { return _got; } | | bool got() const { return _got; } | |
| BSONObj other() const { return _other; } | | BSONObj other() const { return _other; } | |
| | | | |
| private: | | private: | |
| DistributedLock * _lock; | | DistributedLock * _lock; | |
| bool _got; | | bool _got; | |
| BSONObj _other; | | BSONObj _other; | |
| string _why; | | string _why; | |
| | | | |
End of changes. 6 change blocks. |
| 12 lines changed or deleted | | 33 lines changed or added | |
|
| engine_v8.h | | engine_v8.h | |
| | | | |
| skipping to change at line 66 | | skipping to change at line 66 | |
| */ | | */ | |
| template <typename _ObjType> | | template <typename _ObjType> | |
| class ObjTracker { | | class ObjTracker { | |
| public: | | public: | |
| /** Track an object to be freed when it is no longer referenced in
JavaScript. | | /** Track an object to be freed when it is no longer referenced in
JavaScript. | |
| * @param instanceHandle persistent handle to the weakly referenc
ed object | | * @param instanceHandle persistent handle to the weakly referenc
ed object | |
| * @param rawData pointer to the object instance | | * @param rawData pointer to the object instance | |
| */ | | */ | |
| void track(v8::Persistent<v8::Value> instanceHandle, _ObjType* inst
ance) { | | void track(v8::Persistent<v8::Value> instanceHandle, _ObjType* inst
ance) { | |
| TrackedPtr* collectionHandle = new TrackedPtr(instance, this); | | TrackedPtr* collectionHandle = new TrackedPtr(instance, this); | |
|
| | | _container.insert(collectionHandle); | |
| instanceHandle.MakeWeak(collectionHandle, deleteOnCollect); | | instanceHandle.MakeWeak(collectionHandle, deleteOnCollect); | |
| } | | } | |
| /** | | /** | |
|
| * Free any remaining objects which are being tracked. Invoked whe | | * Free any remaining objects and their TrackedPtrs. Invoked when | |
| n | | the | |
| * the V8Scope is destructed. | | * V8Scope is destructed. | |
| */ | | */ | |
| ~ObjTracker() { | | ~ObjTracker() { | |
| if (!_container.empty()) | | if (!_container.empty()) | |
| LOG(1) << "freeing " << _container.size() << " uncollected
" | | LOG(1) << "freeing " << _container.size() << " uncollected
" | |
| << typeid(_ObjType).name() << " objects" << endl; | | << typeid(_ObjType).name() << " objects" << endl; | |
|
| typename set<_ObjType*>::iterator it = _container.begin(); | | typename set<TrackedPtr*>::iterator it = _container.begin(); | |
| while (it != _container.end()) { | | while (it != _container.end()) { | |
| delete *it; | | delete *it; | |
| _container.erase(it++); | | _container.erase(it++); | |
| } | | } | |
| } | | } | |
| private: | | private: | |
| /** | | /** | |
| * Simple struct which contains a pointer to the tracked object, an
d a pointer | | * Simple struct which contains a pointer to the tracked object, an
d a pointer | |
| * to the ObjTracker which owns it. This is the argument supplied
to v8's | | * to the ObjTracker which owns it. This is the argument supplied
to v8's | |
| * WeakReferenceCallback and MakeWeak(). | | * WeakReferenceCallback and MakeWeak(). | |
| */ | | */ | |
| struct TrackedPtr { | | struct TrackedPtr { | |
| public: | | public: | |
| TrackedPtr(_ObjType* instance, ObjTracker<_ObjType>* tracker) : | | TrackedPtr(_ObjType* instance, ObjTracker<_ObjType>* tracker) : | |
| _objPtr(instance), | | _objPtr(instance), | |
| _tracker(tracker) { } | | _tracker(tracker) { } | |
|
| _ObjType* _objPtr; | | scoped_ptr<_ObjType> _objPtr; | |
| ObjTracker<_ObjType>* _tracker; | | ObjTracker<_ObjType>* _tracker; | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * v8 callback for weak persistent handles that have been marked fo
r removal by the | | * v8 callback for weak persistent handles that have been marked fo
r removal by the | |
| * garbage collector. Signature conforms to v8's WeakReferenceCall
back. | | * garbage collector. Signature conforms to v8's WeakReferenceCall
back. | |
| * @param instanceHandle persistent handle to the weakly referenc
ed object | | * @param instanceHandle persistent handle to the weakly referenc
ed object | |
| * @param rawData pointer to the TrackedPtr instance | | * @param rawData pointer to the TrackedPtr instance | |
| */ | | */ | |
| static void deleteOnCollect(v8::Persistent<v8::Value> instanceHandl
e, void* rawData) { | | static void deleteOnCollect(v8::Persistent<v8::Value> instanceHandl
e, void* rawData) { | |
| TrackedPtr* trackedPtr = static_cast<TrackedPtr*>(rawData); | | TrackedPtr* trackedPtr = static_cast<TrackedPtr*>(rawData); | |
|
| trackedPtr->_tracker->_container.erase(trackedPtr->_objPtr); | | trackedPtr->_tracker->_container.erase(trackedPtr); | |
| delete trackedPtr->_objPtr; | | | |
| delete trackedPtr; | | delete trackedPtr; | |
| instanceHandle.Dispose(); | | instanceHandle.Dispose(); | |
| } | | } | |
| | | | |
|
| // container for all instances of the tracked _ObjType | | // container for all TrackedPtrs created by this ObjTracker instanc | |
| set<_ObjType*> _container; | | e | |
| | | set<TrackedPtr*> _container; | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * A V8Scope represents a unit of javascript execution environment; spe
cifically a single | | * A V8Scope represents a unit of javascript execution environment; spe
cifically a single | |
| * isolate and a single context executing in a single mongo thread. A
V8Scope can be reused | | * isolate and a single context executing in a single mongo thread. A
V8Scope can be reused | |
| * in another thread only after reset() has been called. | | * in another thread only after reset() has been called. | |
| * | | * | |
| * NB: | | * NB: | |
| * - v8 objects/handles/etc. cannot be shared between V8Scopes | | * - v8 objects/handles/etc. cannot be shared between V8Scopes | |
| * - in mongod, each scope is associated with an opId (for KillOp sup
port) | | * - in mongod, each scope is associated with an opId (for KillOp sup
port) | |
| | | | |
| skipping to change at line 216 | | skipping to change at line 216 | |
| void injectV8Function(const char* field, v8Function func, v8::Handl
e<v8::Template>& t); | | void injectV8Function(const char* field, v8Function func, v8::Handl
e<v8::Template>& t); | |
| v8::Handle<v8::FunctionTemplate> createV8Function(v8Function func); | | v8::Handle<v8::FunctionTemplate> createV8Function(v8Function func); | |
| virtual ScriptingFunction _createFunction(const char* code, | | virtual ScriptingFunction _createFunction(const char* code, | |
| ScriptingFunction functio
nNumber = 0); | | ScriptingFunction functio
nNumber = 0); | |
| v8::Local<v8::Function> __createFunction(const char* code, | | v8::Local<v8::Function> __createFunction(const char* code, | |
| ScriptingFunction function
Number = 0); | | ScriptingFunction function
Number = 0); | |
| | | | |
| /** | | /** | |
| * Convert BSON types to v8 Javascript types | | * Convert BSON types to v8 Javascript types | |
| */ | | */ | |
|
| v8::Local<v8::Object> mongoToV8(const mongo::BSONObj& m, bool array | | | |
| = 0, | | | |
| bool readOnly = false); | | | |
| v8::Persistent<v8::Object> mongoToLZV8(const mongo::BSONObj& m, boo
l readOnly = false); | | v8::Persistent<v8::Object> mongoToLZV8(const mongo::BSONObj& m, boo
l readOnly = false); | |
| v8::Handle<v8::Value> mongoToV8Element(const BSONElement& f, bool r
eadOnly = false); | | v8::Handle<v8::Value> mongoToV8Element(const BSONElement& f, bool r
eadOnly = false); | |
| | | | |
| /** | | /** | |
| * Convert v8 Javascript types to BSON types | | * Convert v8 Javascript types to BSON types | |
| */ | | */ | |
| mongo::BSONObj v8ToMongo(v8::Handle<v8::Object> obj, int depth = 0)
; | | mongo::BSONObj v8ToMongo(v8::Handle<v8::Object> obj, int depth = 0)
; | |
| void v8ToMongoElement(BSONObjBuilder& b, | | void v8ToMongoElement(BSONObjBuilder& b, | |
| const string& sname, | | const string& sname, | |
| v8::Handle<v8::Value> value, | | v8::Handle<v8::Value> value, | |
| | | | |
| skipping to change at line 450 | | skipping to change at line 448 | |
| v8::V8::AdjustAmountOfExternalAllocatedMemory(_obj.objsize()); | | v8::V8::AdjustAmountOfExternalAllocatedMemory(_obj.objsize()); | |
| } | | } | |
| ~BSONHolder() { | | ~BSONHolder() { | |
| if (_scope && _scope->getIsolate()) | | if (_scope && _scope->getIsolate()) | |
| // if v8 is still up, send hint to GC | | // if v8 is still up, send hint to GC | |
| v8::V8::AdjustAmountOfExternalAllocatedMemory(-_obj.objsize
()); | | v8::V8::AdjustAmountOfExternalAllocatedMemory(-_obj.objsize
()); | |
| } | | } | |
| V8Scope* _scope; | | V8Scope* _scope; | |
| BSONObj _obj; | | BSONObj _obj; | |
| bool _modified; | | bool _modified; | |
|
| list<string> _extra; | | bool _readOnly; | |
| set<string> _removed; | | set<string> _removed; | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * Check for an error condition (e.g. empty handle, JS exception, OOM)
after executing | | * Check for an error condition (e.g. empty handle, JS exception, OOM)
after executing | |
| * a v8 operation. | | * a v8 operation. | |
| * @resultHandle handle storing the result of the preceeding v8
operation | | * @resultHandle handle storing the result of the preceeding v8
operation | |
| * @try_catch the active v8::TryCatch exception handler | | * @try_catch the active v8::TryCatch exception handler | |
| * @param reportError if true, log an error message | | * @param reportError if true, log an error message | |
| * @param assertOnError if true, throw an exception if an error is det
ected | | * @param assertOnError if true, throw an exception if an error is det
ected | |
| | | | |
End of changes. 8 change blocks. |
| 13 lines changed or deleted | | 11 lines changed or added | |
|
| mock_remote_db_server.h | | mock_remote_db_server.h | |
| | | | |
| skipping to change at line 22 | | skipping to change at line 22 | |
| * See the License for the specific language governing permissions and | | * See the License for the specific language governing permissions and | |
| * limitations under the License. | | * limitations under the License. | |
| */ | | */ | |
| | | | |
| #pragma once | | #pragma once | |
| | | | |
| #include <boost/shared_ptr.hpp> | | #include <boost/shared_ptr.hpp> | |
| #include <string> | | #include <string> | |
| #include <vector> | | #include <vector> | |
| | | | |
|
| | | #include "mongo/bson/bson_field.h" | |
| #include "mongo/bson/bsonobjbuilder.h" | | #include "mongo/bson/bsonobjbuilder.h" | |
| #include "mongo/client/dbclientinterface.h" | | #include "mongo/client/dbclientinterface.h" | |
| #include "mongo/platform/unordered_map.h" | | #include "mongo/platform/unordered_map.h" | |
| #include "mongo/util/concurrency/spin_lock.h" | | #include "mongo/util/concurrency/spin_lock.h" | |
| | | | |
| namespace mongo { | | namespace mongo { | |
|
| | | | |
| | | const std::string IdentityNS("local.me"); | |
| | | const BSONField<string> HostField("host"); | |
| | | | |
| /** | | /** | |
| * A very simple mock that acts like a database server. Every object ke
eps track of its own | | * A very simple mock that acts like a database server. Every object ke
eps track of its own | |
| * InstanceID, which initially starts at zero and increments every time
it is restarted. | | * InstanceID, which initially starts at zero and increments every time
it is restarted. | |
| * This is primarily used for simulating the state of which old connect
ions won't be able | | * This is primarily used for simulating the state of which old connect
ions won't be able | |
| * to talk to the sockets that has already been closed on this server. | | * to talk to the sockets that has already been closed on this server. | |
| * | | * | |
| * Note: All operations on this server are protected by a lock. | | * Note: All operations on this server are protected by a lock. | |
| */ | | */ | |
| class MockRemoteDBServer { | | class MockRemoteDBServer { | |
| public: | | public: | |
| | | | |
| skipping to change at line 54 | | skipping to change at line 59 | |
| * ConnectionString::setConnectionHook(MockConnRegistry::get()->get
ConnStrHook()); | | * ConnectionString::setConnectionHook(MockConnRegistry::get()->get
ConnStrHook()); | |
| * MockRemoteDBServer server("$a:27017"); | | * MockRemoteDBServer server("$a:27017"); | |
| * MockConnRegistry::get()->addServer(&server); | | * MockConnRegistry::get()->addServer(&server); | |
| * | | * | |
| * This allows clients using the ConnectionString::connect interfac
e to create | | * This allows clients using the ConnectionString::connect interfac
e to create | |
| * connections to this server. The requirements to make this hook f
ully functional are: | | * connections to this server. The requirements to make this hook f
ully functional are: | |
| * | | * | |
| * 1. hostAndPort of this server should start with $. | | * 1. hostAndPort of this server should start with $. | |
| * 2. No other instance has the same hostAndPort as this. | | * 2. No other instance has the same hostAndPort as this. | |
| * | | * | |
|
| | | * This server will also contain the hostAndPort inside the Identit | |
| | | yNS | |
| | | * collection. This is convenient for testing query routing. | |
| | | * | |
| * @param hostAndPort the host name with port for this server. | | * @param hostAndPort the host name with port for this server. | |
| * | | * | |
| * @see MockConnRegistry | | * @see MockConnRegistry | |
| */ | | */ | |
| MockRemoteDBServer(const std::string& hostAndPort); | | MockRemoteDBServer(const std::string& hostAndPort); | |
| virtual ~MockRemoteDBServer(); | | virtual ~MockRemoteDBServer(); | |
| | | | |
| // | | // | |
| // Connectivity methods | | // Connectivity methods | |
| // | | // | |
| | | | |
| /** | | /** | |
| * Set a delay for calls to query and runCommand | | * Set a delay for calls to query and runCommand | |
| */ | | */ | |
| void setDelay(long long milliSec); | | void setDelay(long long milliSec); | |
| | | | |
| /** | | /** | |
| * Shuts down this server. Any operations on this server with an In
stanceID | | * Shuts down this server. Any operations on this server with an In
stanceID | |
| * less than or equal to the current one will throw a mongo::Socket
Exception. | | * less than or equal to the current one will throw a mongo::Socket
Exception. | |
|
| * To bring the server up again, use the #reboot method. | | * To bring the server up again, use the reboot method. | |
| */ | | */ | |
| void shutdown(); | | void shutdown(); | |
| | | | |
| /** | | /** | |
| * Increments the instanceID of this server. | | * Increments the instanceID of this server. | |
| */ | | */ | |
| void reboot(); | | void reboot(); | |
| | | | |
| /** | | /** | |
| * @return true if this server is running | | * @return true if this server is running | |
| | | | |
End of changes. 4 change blocks. |
| 1 lines changed or deleted | | 10 lines changed or added | |
|
| s2cursor.h | | s2cursor.h | |
| | | | |
| skipping to change at line 42 | | skipping to change at line 42 | |
| S2Cursor(const BSONObj &keyPattern, const IndexDetails* details, co
nst BSONObj &query, | | S2Cursor(const BSONObj &keyPattern, const IndexDetails* details, co
nst BSONObj &query, | |
| const vector<GeoQuery> ®ions, const S2IndexingParams &p
arams); | | const vector<GeoQuery> ®ions, const S2IndexingParams &p
arams); | |
| virtual ~S2Cursor(); | | virtual ~S2Cursor(); | |
| virtual CoveredIndexMatcher *matcher() const; | | virtual CoveredIndexMatcher *matcher() const; | |
| | | | |
| virtual bool supportYields() { return true; } | | virtual bool supportYields() { return true; } | |
| virtual bool supportGetMore() { return true; } | | virtual bool supportGetMore() { return true; } | |
| virtual bool isMultiKey() const { return true; } | | virtual bool isMultiKey() const { return true; } | |
| virtual bool autoDedup() const { return false; } | | virtual bool autoDedup() const { return false; } | |
| virtual bool modifiedKeys() const { return true; } | | virtual bool modifiedKeys() const { return true; } | |
|
| virtual bool getsetdup(DiskLoc loc) { return false; } | | virtual bool getsetdup(DiskLoc loc); | |
| | | virtual void aboutToDeleteBucket(const DiskLoc& b); | |
| virtual string toString() { return "S2Cursor"; } | | virtual string toString() { return "S2Cursor"; } | |
| BSONObj indexKeyPattern() { return _keyPattern; } | | BSONObj indexKeyPattern() { return _keyPattern; } | |
| virtual bool ok(); | | virtual bool ok(); | |
| virtual Record* _current(); | | virtual Record* _current(); | |
| virtual BSONObj current(); | | virtual BSONObj current(); | |
| virtual DiskLoc currLoc(); | | virtual DiskLoc currLoc(); | |
| virtual bool advance(); | | virtual bool advance(); | |
| virtual BSONObj currKey() const; | | virtual BSONObj currKey() const; | |
| virtual DiskLoc refLoc(); | | virtual DiskLoc refLoc(); | |
| virtual void noteLocation(); | | virtual void noteLocation(); | |
| | | | |
End of changes. 1 change blocks. |
| 1 lines changed or deleted | | 2 lines changed or added | |
|