Package com.aerospike.client

Examples of com.aerospike.client.Key


  public static HashMap<Key,BatchItem> generateMap(Key[] keys) {
   
    HashMap<Key,BatchItem> keyMap = new HashMap<Key,BatchItem>(keys.length);
   
    for (int i = 0; i < keys.length; i++) {
      Key key = keys[i];
      BatchItem item = keyMap.get(key);
     
      if (item == null) {
        item = new BatchItem(i);
        keyMap.put(key, item);
View Full Code Here


     
      int generation = Buffer.bytesToInt(dataBuffer, 6);
      int expiration = Buffer.bytesToInt(dataBuffer, 10);
      int fieldCount = Buffer.bytesToShort(dataBuffer, 18);
      int opCount = Buffer.bytesToShort(dataBuffer, 20);
      Key key = parseKey(fieldCount);
      BatchItem item = keyMap.get(key);
     
      if (item != null) {       
        if (resultCode == 0) {
          int index = item.getIndex();
View Full Code Here

    // Split keys by server node.
    List<BatchNode> batchNodes = new ArrayList<BatchNode>(nodeCount+1);
       
    for (int i = 0; i < keys.length; i++) {
      Key key = keys[i];
      Partition partition = new Partition(key);     
      BatchNode batchNode;
     
      Node node = cluster.getNode(partition);
      batchNode = findBatchNode(batchNodes, node);
View Full Code Here

  public static HashMap<Key,BatchItem> generateMap(Key[] keys) {
   
    HashMap<Key,BatchItem> keyMap = new HashMap<Key,BatchItem>(keys.length);
   
    for (int i = 0; i < keys.length; i++) {
      Key key = keys[i];
      BatchItem item = keyMap.get(key);
     
      if (item == null) {
        item = new BatchItem(i);
        keyMap.put(key, item);
View Full Code Here

      int generation = Buffer.bytesToInt(dataBuffer, 6);
      int expiration = Buffer.bytesToInt(dataBuffer, 10);
      int fieldCount = Buffer.bytesToShort(dataBuffer, 18);
      int opCount = Buffer.bytesToShort(dataBuffer, 20);
     
      Key key = parseKey(fieldCount);

      // Parse bins.
      Map<String,Object> bins = null;
     
      for (int i = 0 ; i < opCount; i++) {
View Full Code Here

     
      int generation = Buffer.bytesToInt(dataBuffer, 6);
      int expiration = Buffer.bytesToInt(dataBuffer, 10);
      int fieldCount = Buffer.bytesToShort(dataBuffer, 18);
      int opCount = Buffer.bytesToShort(dataBuffer, 20);
      Key key = parseKey(fieldCount);
      BatchItem item = keyMap.get(key);
     
      if (item != null) {       
        if (resultCode == 0) {
          int index = item.getIndex();
View Full Code Here

      }       
      else if (fieldtype == FieldType.TABLE) {
        setName = Buffer.utf8ToString(dataBuffer, 1, size);
      }       
    }
    return new Key(namespace, digest, setName);   
  }
View Full Code Here

     
      if (opCount > 0) {
        throw new AerospikeException.Parse("Received bins that were not requested!");
      }
           
      Key key = parseKey(fieldCount);
      BatchItem item = keyMap.get(key);
     
      if (item != null) {
        int index = item.getIndex();
        existsArray[index] = resultCode == 0;
View Full Code Here

      int generation = Buffer.bytesToInt(dataBuffer, 6);
      int expiration = Buffer.bytesToInt(dataBuffer, 10);
      int fieldCount = Buffer.bytesToShort(dataBuffer, 18);
      int opCount = Buffer.bytesToShort(dataBuffer, 20);
     
      Key key = parseKey(fieldCount);

      // Parse bins.
      Map<String,Object> bins = null;
     
      for (int i = 0 ; i < opCount; i++) {
View Full Code Here

    // Split keys by server node.
    List<BatchNode> batchNodes = new ArrayList<BatchNode>(nodeCount+1);
       
    for (int i = 0; i < keys.length; i++) {
      Key key = keys[i];
      Partition partition = new Partition(key);     
      BatchNode batchNode;
     
      Node node = cluster.getNode(partition);
      batchNode = findBatchNode(batchNodes, node);
View Full Code Here

TOP

Related Classes of com.aerospike.client.Key

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.