YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense alongwiththisprogram;ifnot,writetotheFreeSoftware
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
#pragma once
/* C++ standard header file */ #include <chrono> #include <condition_variable> #include <functional> #include <mutex> #include <unordered_map>
/* MySQL header files */ #include"./my_sys.h" #include"mysql/plugin.h"
// Attempt to acquire lock. Return OK on success, or other Status on failure. // If returned status is OK, TransactionDB will eventually call UnLock().
rocksdb::Status Lock() override;
// Attempt to acquire lock. If timeout is non-negative, operation should be // failed after this many microseconds. // Returns OK on success, // TimedOut if timed out, // or other Status on failure. // If returned status is OK, TransactionDB will eventually call UnLock(). virtual rocksdb::Status TryLockFor(
int64_t timeout_time MY_ATTRIBUTE((__unused__))) override;
// Unlock Mutex that was successfully locked by Lock() or TryLockUntil() void UnLock() override;
// Block current thread until condition variable is notified by a call to // Notify() or NotifyAll(). Wait() will be called with mutex locked. // Returns OK if notified. // Returns non-OK if TransactionDB should stop waiting and fail the operation. // May return OK spuriously even if not notified. virtual rocksdb::Status Wait( const std::shared_ptr<rocksdb::TransactionDBMutex> mutex) override;
// Block current thread until condition variable is notified by a call to // Notify() or NotifyAll(), or if the timeout is reached. // If timeout is non-negative, operation should be failed after this many // microseconds. // If implementing a custom version of this class, the implementation may // choose to ignore the timeout. // // Returns OK if notified. // Returns TimedOut if timeout is reached. // Returns other status if TransactionDB should otherwis stop waiting and // fail the operation. // May return OK spuriously even if not notified. virtual rocksdb::Status WaitFor( const std::shared_ptr<rocksdb::TransactionDBMutex> mutex,
int64_t timeout_time) override;
// If any threads are waiting on *this, unblock at least one of the // waiting threads. void Notify() override;
// Unblocks all threads waiting on *this. void NotifyAll() override;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.