Package com.aerospike.client

Examples of com.aerospike.client.AerospikeException


        in.close();
      }
      return Base64.encode(bytes, 0, bytes.length, false);
    }
    catch (Exception e) {
      throw new AerospikeException("Failed to read " + path, e);
    }
  }
View Full Code Here


        throw new Exception();
      }
      return is;
    }
    catch (Exception e) {
      throw new AerospikeException("Failed to read resource: " + path);
    }
  }
View Full Code Here

   
    try {
      return new FileInputStream(source);
    }
    catch (Exception e) {
      throw new AerospikeException("Failed to read file: " + source.getAbsolutePath());
    }
  }
View Full Code Here

      finally {
        is.close();
      }
    }
    catch (Exception e) {
      throw new AerospikeException("Failed to compile: " + packageName);
    }
  }
View Full Code Here

    conn.readFully(dataBuffer, MSG_TOTAL_HEADER_SIZE);
   
    int resultCode = dataBuffer[13] & 0xFF;
 
      if (resultCode != 0) {
        throw new AerospikeException(resultCode);         
      }         
    emptySocket(conn);
  }
View Full Code Here

    if (exception != null) {
      if (exception instanceof AerospikeException) {
        throw (AerospikeException)exception;   
      }
      else {
        throw new AerospikeException(exception);
      }   
    }
  }
View Full Code Here

        else {
      if (resultCode == ResultCode.KEY_NOT_FOUND_ERROR) {
        record = null;
      }
      else {
        throw new AerospikeException(resultCode);
      }
    }
    emptySocket(conn);
  }
View Full Code Here

      int resultCode = dataBuffer[5] & 0xFF;

      // The only valid server return codes are "ok" and "not found".
      // If other return codes are received, then abort the batch.
      if (resultCode != 0 && resultCode != ResultCode.KEY_NOT_FOUND_ERROR) {
        throw new AerospikeException(resultCode);               
      }
     
      byte info3 = dataBuffer[3];

      // If this is the end marker of the response, do not proceed further
View Full Code Here

 
  public static List<BatchNode> generateList(Cluster cluster, Key[] keys) throws AerospikeException {
    Node[] nodes = cluster.getNodes();
   
    if (nodes.length == 0) {
      throw new AerospikeException(ResultCode.SERVER_NOT_AVAILABLE, "Command failed because cluster is empty.");
    }
   
    int nodeCount = nodes.length;
    int keysPerNode = keys.length / nodeCount + 10;
View Full Code Here

    if (exception != null) {
      if (exception instanceof AerospikeException) {
        throw (AerospikeException)exception;   
      }
      else {
        throw new AerospikeException(exception);
      }   
    }   
  }
View Full Code Here

TOP

Related Classes of com.aerospike.client.AerospikeException

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.