Package com.aerospike.client.command

Examples of com.aerospike.client.command.Command


   * @param listener        where to send results
   * @param key          unique record identifier
   * @throws AerospikeException  if queue is full
   */ 
  public final void get(Policy policy, RecordListener listener, Key key) throws AerospikeException {
    Command command = new Command();
    command.setRead(key);

    AsyncRead async = new AsyncRead(cluster, key, listener);
    async.execute(policy, command);
  }
View Full Code Here


   * @param key          unique record identifier
   * @param binNames        bins to retrieve
   * @throws AerospikeException  if queue is full
   */
  public final void get(Policy policy, RecordListener listener, Key key, String... binNames) throws AerospikeException
    Command command = new Command();
    command.setRead(key, binNames);

    AsyncRead async = new AsyncRead(cluster, key, listener);
    async.execute(policy, command);
  }
View Full Code Here

   * @param listener        where to send results
   * @param key          unique record identifier
   * @throws AerospikeException  if queue is full
   */
  public final void getHeader(Policy policy, RecordListener listener, Key key) throws AerospikeException {
    Command command = new Command();
    command.setReadHeader(key);
   
    AsyncRead async = new AsyncRead(cluster, key, listener);
    async.execute(policy, command);
  }
View Full Code Here

   * @param operations      database operations to perform
   * @throws AerospikeException  if queue is full
   */
  public final void operate(WritePolicy policy, RecordListener listener, Key key, Operation... operations)
    throws AerospikeException {   
    Command command = new Command();
    command.setOperate(policy, key, operations);

    AsyncRead async = new AsyncRead(cluster, key, listener);
    async.execute(policy, command);
  }
View Full Code Here

    this.listener = listener;
   
    // Dispatch asynchronous commands to nodes.
    for (BatchNode batchNode : batchNodes) {     
      for (BatchNamespace batchNamespace : batchNode.batchNamespaces) {
        Command command = new Command();
        command.setBatchExists(batchNamespace);
       
        AsyncBatchExistsSequence async = new AsyncBatchExistsSequence(this, cluster, (AsyncNode)batchNode.node, listener);
        async.execute(policy, command);
      }
    }
View Full Code Here

    HashMap<Key,BatchItem> keyMap = BatchItem.generateMap(keys);
   
    // Dispatch asynchronous commands to nodes.
    for (BatchNode batchNode : batchNodes) {     
      for (BatchNamespace batchNamespace : batchNode.batchNamespaces) {
        Command command = new Command();
        command.setBatchExists(batchNamespace);
       
        AsyncBatchExistsArray async = new AsyncBatchExistsArray(this, cluster, (AsyncNode)batchNode.node, keyMap, existsArray);
        async.execute(policy, command);
      }
    }
View Full Code Here

TOP

Related Classes of com.aerospike.client.command.Command

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.