21 #ifndef KINETIC_CPP_CLIENT_THREADSAFE_NONBLOCKING_CONNECTION_H_
22 #define KINETIC_CPP_CLIENT_THREADSAFE_NONBLOCKING_CONNECTION_H_
24 #include "kinetic/nonblocking_kinetic_connection_interface.h"
25 #include "kinetic/nonblocking_kinetic_connection.h"
38 bool Run(fd_set *read_fds, fd_set *write_fds,
int *nfds);
39 bool RemoveHandler(HandlerKey handler_key);
40 void SetClientClusterVersion(int64_t cluster_version);
42 HandlerKey NoOp(
const shared_ptr<SimpleCallbackInterface> callback);
43 HandlerKey Get(
const string key,
const shared_ptr<GetCallbackInterface> callback);
44 HandlerKey Get(
const shared_ptr<const string> key,
const shared_ptr<GetCallbackInterface> callback);
45 HandlerKey GetNext(
const shared_ptr<const string> key,
const shared_ptr<GetCallbackInterface> callback);
46 HandlerKey GetNext(
const string key,
const shared_ptr<GetCallbackInterface> callback);
47 HandlerKey GetPrevious(
const shared_ptr<const string> key,
const shared_ptr<GetCallbackInterface> callback);
48 HandlerKey GetPrevious(
const string key,
const shared_ptr<GetCallbackInterface> callback);
49 HandlerKey GetVersion(
const shared_ptr<const string> key,
const shared_ptr<GetVersionCallbackInterface> callback);
50 HandlerKey GetVersion(
const string key,
const shared_ptr<GetVersionCallbackInterface> callback);
51 HandlerKey GetKeyRange(
const shared_ptr<const string> start_key,
bool start_key_inclusive,
52 const shared_ptr<const string> end_key,
bool end_key_inclusive,
53 bool reverse_results, int32_t max_results,
const shared_ptr<GetKeyRangeCallbackInterface> callback);
54 HandlerKey GetKeyRange(
const string start_key,
bool start_key_inclusive,
55 const string end_key,
bool end_key_inclusive,
56 bool reverse_results, int32_t max_results,
const shared_ptr<GetKeyRangeCallbackInterface> callback);
57 HandlerKey Put(
const shared_ptr<const string> key,
const shared_ptr<const string> current_version, WriteMode mode,
58 const shared_ptr<const KineticRecord> record,
const shared_ptr<PutCallbackInterface> callback);
59 HandlerKey Put(
const string key,
const string current_version, WriteMode mode,
60 const shared_ptr<const KineticRecord> record,
const shared_ptr<PutCallbackInterface> callback);
61 HandlerKey Put(
const shared_ptr<const string> key,
const shared_ptr<const string> current_version, WriteMode mode,
62 const shared_ptr<const KineticRecord> record,
const shared_ptr<PutCallbackInterface> callback,
63 PersistMode persistMode);
64 HandlerKey Put(
const string key,
const string current_version, WriteMode mode,
65 const shared_ptr<const KineticRecord> record,
const shared_ptr<PutCallbackInterface> callback,
66 PersistMode persistMode);
67 HandlerKey Delete(
const shared_ptr<const string> key,
const shared_ptr<const string> version, WriteMode mode,
68 const shared_ptr<SimpleCallbackInterface> callback, PersistMode persistMode);
69 HandlerKey Delete(
const string key,
const string version, WriteMode mode,
70 const shared_ptr<SimpleCallbackInterface> callback, PersistMode persistMode);
71 HandlerKey Delete(
const shared_ptr<const string> key,
const shared_ptr<const string> version, WriteMode mode,
72 const shared_ptr<SimpleCallbackInterface> callback);
73 HandlerKey Delete(
const string key,
const string version, WriteMode mode,
74 const shared_ptr<SimpleCallbackInterface> callback);
75 HandlerKey P2PPush(
const P2PPushRequest& push_request,
const shared_ptr<P2PPushCallbackInterface> callback);
76 HandlerKey P2PPush(
const shared_ptr<const P2PPushRequest> push_request,
77 const shared_ptr<P2PPushCallbackInterface> callback);
78 HandlerKey GetLog(
const shared_ptr<GetLogCallbackInterface> callback);
79 HandlerKey GetLog(
const vector<Command_GetLog_Type>& types,
const shared_ptr<GetLogCallbackInterface> callback);
81 HandlerKey UpdateFirmware(
const shared_ptr<const string> new_firmware,
const shared_ptr<SimpleCallbackInterface> callback);
82 HandlerKey SetClusterVersion(int64_t new_cluster_version,
const shared_ptr<SimpleCallbackInterface> callback);
84 HandlerKey InstantErase(
const shared_ptr<string> pin,
const shared_ptr<SimpleCallbackInterface> callback);
85 HandlerKey InstantErase(
const string pin,
const shared_ptr<SimpleCallbackInterface> callback);
86 HandlerKey SecureErase(
const shared_ptr<string> pin,
const shared_ptr<SimpleCallbackInterface> callback);
87 HandlerKey SecureErase(
const string pin,
const shared_ptr<SimpleCallbackInterface> callback);
88 HandlerKey LockDevice(
const shared_ptr<string> pin,
const shared_ptr<SimpleCallbackInterface> callback);
89 HandlerKey LockDevice(
const string pin,
const shared_ptr<SimpleCallbackInterface> callback);
90 HandlerKey UnlockDevice(
const shared_ptr<string> pin,
const shared_ptr<SimpleCallbackInterface> callback);
91 HandlerKey UnlockDevice(
const string pin,
const shared_ptr<SimpleCallbackInterface> callback);
93 HandlerKey SetACLs(
const shared_ptr<
const list<ACL>> acls,
const shared_ptr<SimpleCallbackInterface> callback);
94 HandlerKey SetErasePIN(
const shared_ptr<const string> new_pin,
const shared_ptr<const string> current_pin,
95 const shared_ptr<SimpleCallbackInterface> callback);
96 HandlerKey SetErasePIN(
const string new_pin,
const string current_pin,
97 const shared_ptr<SimpleCallbackInterface> callback);
98 HandlerKey SetLockPIN(
const shared_ptr<const string> new_pin,
const shared_ptr<const string> current_pin,
99 const shared_ptr<SimpleCallbackInterface> callback);
100 HandlerKey SetLockPIN(
const string new_pin,
const string current_pin,
101 const shared_ptr<SimpleCallbackInterface> callback);
106 std::recursive_mutex mutex_;
107 std::unique_ptr<NonblockingKineticConnection> connection_;
113 #endif // KINETIC_CPP_CLIENT_THREADSAFE_NONBLOCKING_CONNECTION_H_
Represents a collection of P2P operations.
Kinetic connection class variant that synchronizes concurrent access and allows non-blocking IO...