Package com.aerospike.client.command

Examples of com.aerospike.client.command.Command


    this.listener = listener;
   
    // Dispatch asynchronous commands to nodes.
    for (BatchNode batchNode : batchNodes) {     
      for (BatchNamespace batchNamespace : batchNode.batchNamespaces) {
        Command command = new Command();
        command.setBatchGet(batchNamespace, binNames, readAttr);
       
        AsyncBatchGetSequence async = new AsyncBatchGetSequence(this, cluster, (AsyncNode)batchNode.node, binNames, 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.setBatchGet(batchNamespace, binNames, readAttr);
       
        AsyncBatchGetArray async = new AsyncBatchGetArray(this, cluster, (AsyncNode)batchNode.node, keyMap, binNames, recordArray);
        async.execute(policy, command);
      }
    }
View Full Code Here

    String setName,
    String[] binNames
  ) throws AerospikeException {
    this.listener = listener;
   
    Command command = new Command();
    command.setScan(policy, namespace, setName, binNames);

    Node[] nodes = cluster.getNodes();
    completedSize = nodes.length;

    for (Node node : nodes) {     
View Full Code Here

   * @param key          unique record identifier
   * @param bins          array of bin name/value pairs
   * @throws AerospikeException  if queue is full
   */
  public final void put(WritePolicy policy, WriteListener listener, Key key, Bin... bins) throws AerospikeException {
    Command command = new Command();
    command.setWrite(policy, Operation.Type.WRITE, key, bins);
   
    AsyncWrite async = new AsyncWrite(cluster, key, listener);
    async.execute(policy, command);
  }
View Full Code Here

   * @param key          unique record identifier
   * @param bins          array of bin name/value pairs
   * @throws AerospikeException  if queue is full
   */
  public final void append(WritePolicy policy, WriteListener listener, Key key, Bin... bins) throws AerospikeException {
    Command command = new Command();
    command.setWrite(policy, Operation.Type.APPEND, key, bins);
   
    AsyncWrite async = new AsyncWrite(cluster, key, listener);
    async.execute(policy, command);
  }
View Full Code Here

   * @param key          unique record identifier
   * @param bins          array of bin name/value pairs
   * @throws AerospikeException  if queue is full
   */
  public final void prepend(WritePolicy policy, WriteListener listener, Key key, Bin... bins) throws AerospikeException {
    Command command = new Command();
    command.setWrite(policy, Operation.Type.PREPEND, key, bins);
   
    AsyncWrite async = new AsyncWrite(cluster, key, listener);
    async.execute(policy, command);
  }
View Full Code Here

   * @param key          unique record identifier
   * @param bins          array of bin name/value pairs
   * @throws AerospikeException  if queue is full
   */
  public final void add(WritePolicy policy, WriteListener listener, Key key, Bin... bins) throws AerospikeException {
    Command command = new Command();
    command.setWrite(policy, Operation.Type.ADD, key, bins);
   
    AsyncWrite async = new AsyncWrite(cluster, key, listener);
    async.execute(policy, command);
  }
View Full Code Here

   * @param listener        where to send results, pass in null for fire and forget
   * @param key          unique record identifier
   * @throws AerospikeException  if queue is full
   */
  public final void delete(WritePolicy policy, DeleteListener listener, Key key) throws AerospikeException {
    Command command = new Command();
    command.setDelete(policy, key);   

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

   * @param listener        where to send results, pass in null for fire and forget
   * @param key          unique record identifier
   * @throws AerospikeException  if queue is full
   */
  public final void touch(WritePolicy policy, WriteListener listener, Key key) throws AerospikeException {
    Command command = new Command();
    command.setTouch(policy, key);
   
    AsyncWrite async = new AsyncWrite(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 exists(Policy policy, ExistsListener listener, Key key) throws AerospikeException {
    Command command = new Command();
    command.setExists(key);
   
    AsyncExists async = new AsyncExists(cluster, key, listener);
    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.