public AsyncRead(AsyncRead other) : base(other) { this.listener = other.listener; this.key = other.key; this.binNames = other.binNames; }
/// <summary> /// Asynchronously read record header and bins for specified key. /// Schedule the get command with a channel selector and return. /// Another thread will process the command and send the results to the listener. /// <para> /// The policy can be used to specify timeouts. /// </para> /// </summary> /// <param name="policy">generic configuration parameters, pass in null for defaults</param> /// <param name="listener">where to send results</param> /// <param name="key">unique record identifier</param> /// <param name="binNames">bins to retrieve</param> /// <exception cref="AerospikeException">if queue is full</exception> public void Get(Policy policy, RecordListener listener, Key key, params string[] binNames) { if (policy == null) { policy = readPolicyDefault; } AsyncRead async = new AsyncRead(cluster, policy, listener, key, binNames); async.Execute(); }
/// <summary> /// Asynchronously read entire record for specified key. /// Schedule the get command with a channel selector and return. /// Another thread will process the command and send the results to the listener. /// <para> /// The policy can be used to specify timeouts. /// </para> /// </summary> /// <param name="policy">generic configuration parameters, pass in null for defaults</param> /// <param name="listener">where to send results</param> /// <param name="key">unique record identifier</param> /// <exception cref="AerospikeException">if queue is full</exception> public void Get(Policy policy, RecordListener listener, Key key) { if (policy == null) { policy = readPolicyDefault; } AsyncRead async = new AsyncRead(cluster, policy, listener, key, null); async.Execute(); }