Commit 7effc47b authored by Andrew Mitchell's avatar Andrew Mitchell
Browse files

Added persistMode to delete in blocking client and threadsafe clients

parent 5aa58a31
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -138,6 +138,12 @@ class BlockingKineticConnection {
            const string& current_version, WriteMode mode,
            const KineticRecord& record);

    virtual KineticStatus Delete(const shared_ptr<const string> key,
            const shared_ptr<const string> version, WriteMode mode, PersistMode persistMode);

    virtual KineticStatus Delete(const string& key, const string& version,
            WriteMode mode, PersistMode persistMode);

    virtual KineticStatus Delete(const shared_ptr<const string> key,
            const shared_ptr<const string> version, WriteMode mode);

+1 −1
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ class ThreadsafeBlockingKineticConnection : public BlockingKineticConnection {
            PersistMode persistMode);

    KineticStatus Delete(const shared_ptr<const string> key,
            const shared_ptr<const string> version, WriteMode mode);
            const shared_ptr<const string> version, WriteMode mode, PersistMode persistMode);

    KineticStatus InstantSecureErase(const shared_ptr<string> pin);

+6 −2
Original line number Diff line number Diff line
@@ -72,8 +72,12 @@ class ThreadsafeNonblockingKineticConnection : public NonblockingKineticConnecti
        const shared_ptr<const KineticRecord> record,
        const shared_ptr<PutCallbackInterface> callback,
        PersistMode persistMode);
    HandlerKey Delete(const shared_ptr<const string> key, const shared_ptr<const string> version,
        WriteMode mode, const shared_ptr<SimpleCallbackInterface> callback);
    HandlerKey Delete(
            const shared_ptr<const string> key,
            const shared_ptr<const string> version,
            WriteMode mode,
            const shared_ptr<SimpleCallbackInterface> callback,
            PersistMode persistMode);
    HandlerKey InstantSecureErase(const shared_ptr<string> pin,
        const shared_ptr<SimpleCallbackInterface> callback);
    HandlerKey SetClusterVersion(int64_t new_cluster_version,
+14 −0
Original line number Diff line number Diff line
@@ -229,9 +229,23 @@ KineticStatus BlockingKineticConnection::Put(const string& key,
        make_shared<KineticRecord>(record));
}

KineticStatus BlockingKineticConnection::Delete(const shared_ptr<const string> key,
    const shared_ptr<const string> version, WriteMode mode, PersistMode persistMode) {
    auto callback = make_shared<SimpleCallback>();
    return RunOperation(callback, nonblocking_connection_->Delete(key, version, mode,
            callback, persistMode));
}

KineticStatus BlockingKineticConnection::Delete(const string& key, const string& version,
    WriteMode mode, PersistMode persistMode) {
    return this->Delete(make_shared<string>(key),
            make_shared<string>(version), mode, persistMode);
}

KineticStatus BlockingKineticConnection::Delete(const shared_ptr<const string> key,
    const shared_ptr<const string> version, WriteMode mode) {
    auto callback = make_shared<SimpleCallback>();
    // Let the nonblocking_connection handle the default persistOption
    return RunOperation(callback, nonblocking_connection_->Delete(key, version, mode, callback));
}

+2 −2
Original line number Diff line number Diff line
@@ -63,9 +63,9 @@ KineticStatus ThreadsafeBlockingKineticConnection::Put(const shared_ptr<const st
}

KineticStatus ThreadsafeBlockingKineticConnection::Delete(const shared_ptr<const string> key,
        const shared_ptr<const string> version, WriteMode mode) {
        const shared_ptr<const string> version, WriteMode mode, PersistMode persistMode) {
        std::lock_guard<std::mutex> guard(mutex_);
        return BlockingKineticConnection::Delete(key, version, mode);
        return BlockingKineticConnection::Delete(key, version, mode, persistMode);
}

KineticStatus ThreadsafeBlockingKineticConnection::InstantSecureErase(const shared_ptr<string> pin) {
Loading