Exemple #1
0
 public AsyncReadHeader(AsyncCluster cluster, Policy policy, RecordListener listener, Key key)
     : base(cluster, policy)
 {
     this.listener  = listener;
     this.key       = key;
     this.partition = new Partition(key);
 }
Exemple #2
0
 public AsyncReadHeader(AsyncReadHeader other)
     : base(other)
 {
     this.listener  = other.listener;
     this.key       = other.key;
     this.partition = other.partition;
 }
 public AsyncRead(AsyncRead other)
     : base(other)
 {
     this.listener = other.listener;
     this.key      = other.key;
     this.binNames = other.binNames;
 }
 public AsyncRead(AsyncCluster cluster, Policy policy, RecordListener listener, Key key, string[] binNames, bool isRead)
     : base(cluster, policy, new Partition(key), isRead)
 {
     this.listener = listener;
     this.key      = key;
     this.binNames = binNames;
 }
 public AsyncReadHeader(AsyncCluster cluster, Policy policy, RecordListener listener, Key key)
     : base(cluster)
 {
     this.policy = policy;
     this.listener = listener;
     this.key = key;
     this.partition = new Partition(key);
 }
Exemple #6
0
 // Operate constructor.
 public AsyncRead(AsyncCluster cluster, Policy policy, RecordListener listener, Key key, Partition partition)
     : base(cluster, policy)
 {
     this.listener  = listener;
     this.key       = key;
     this.binNames  = null;
     this.partition = partition;
 }
Exemple #7
0
 // Operate constructor.
 public AsyncRead(AsyncCluster cluster, RecordListener listener, Key key)
     : base(cluster, null, false)
 {
     this.listener  = listener;
     this.key       = key;
     this.binNames  = null;
     this.partition = null;
 }
Exemple #8
0
 // UDF constructor.
 public AsyncRead(AsyncCluster cluster, WritePolicy policy, Key key)
     : base(cluster, policy)
 {
     this.listener  = null;
     this.key       = key;
     this.binNames  = null;
     this.partition = Partition.Write(cluster, policy, key);
 }
Exemple #9
0
 // Read constructor.
 public AsyncRead(AsyncCluster cluster, Policy policy, RecordListener listener, Key key, string[] binNames)
     : base(cluster, policy)
 {
     this.listener  = listener;
     this.key       = key;
     this.binNames  = binNames;
     this.partition = Partition.Read(cluster, policy, key);
 }
 public AsyncRead(AsyncCluster cluster, Policy policy, RecordListener listener, Key key, string[] binNames)
     : base(cluster)
 {
     this.policy    = policy;
     this.listener  = listener;
     this.key       = key;
     this.partition = new Partition(key);
     this.binNames  = binNames;
 }
 public AsyncRead(AsyncCluster cluster, Policy policy, RecordListener listener, Key key, string[] binNames)
     : base(cluster)
 {
     this.policy = policy;
     this.listener = listener;
     this.key = key;
     this.partition = new Partition(key);
     this.binNames = binNames;
 }
 /// <summary>
 /// Asynchronously perform multiple read/write operations on a single key in one batch call.
 /// Schedule the operate command with a channel selector and return.
 /// Another thread will process the command and send the results to the listener.
 /// <para>
 /// An example would be to add an integer value to an existing record and then
 /// read the result, all in one database call.
 /// </para>
 /// </summary>
 /// <param name="policy">write configuration parameters, pass in null for defaults</param>
 /// <param name="listener">where to send results, pass in null for fire and forget</param>
 /// <param name="key">unique record identifier</param>
 /// <param name="operations">database operations to perform</param>
 /// <exception cref="AerospikeException">if queue is full</exception>
 public void Operate(WritePolicy policy, RecordListener listener, Key key, params Operation[] operations)
 {
     if (policy == null)
     {
         policy = writePolicyDefault;
     }
     AsyncOperate async = new AsyncOperate(cluster, policy, listener, key, operations);
     async.Execute();
 }
Exemple #13
0
 public AsyncOperate(AsyncCluster cluster, RecordListener listener, Key key, Operation[] operations)
     : base(cluster, null, listener, key, null, false)
 {
     this.operations = operations;
 }
 public AsyncOperate(AsyncCluster cluster, RecordListener listener, Key key, OperateArgs args)
     : base(cluster, args.writePolicy, listener, key, args.partition)
 {
     this.args = args;
 }
 /// <summary>
 /// Asynchronously read record generation and expiration only for specified key.  Bins are not read.
 /// 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 GetHeader(Policy policy, RecordListener listener, Key key)
 {
     if (policy == null)
     {
         policy = readPolicyDefault;
     }
     AsyncReadHeader async = new AsyncReadHeader(cluster, policy, listener, key);
     async.Execute();
 }
 /// <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();
 }
 public AsyncOperate(AsyncCluster cluster, WritePolicy policy, RecordListener listener, Key key, Operation[] operations)
     : base(cluster, policy, listener, key, null)
 {
     this.writePolicy = policy;
     this.operations = operations;
 }
Exemple #18
0
 public AsyncOperate(AsyncCluster cluster, WritePolicy policy, RecordListener listener, Key key, Operation[] operations)
     : base(cluster, policy, listener, key, null)
 {
     this.writePolicy = policy;
     this.operations  = operations;
 }
Exemple #19
0
 public void removeRecordListener(RecordListener listener)
 {
 }
Exemple #20
0
 public void addRecordListener(RecordListener listener)
 {
 }