Package com.aerospike.client

Examples of com.aerospike.client.AerospikeException


        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

        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

     
      if (resultCode != 0) {
        if (resultCode == ResultCode.KEY_NOT_FOUND_ERROR) {
          return false;
        }
        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

   
    completedCount = new AtomicInteger();

    Node[] nodes = cluster.getNodes();
    if (nodes.length == 0) {
      throw new AerospikeException(ResultCode.SERVER_NOT_AVAILABLE, "Command failed because cluster is empty.");
    }

    threads = new ServerThread[nodes.length];
   
    for (int i = 0; i < nodes.length; i++) {
      ServerCommand command = new ServerCommand(nodes[i], policy, statement);
      threads[i] = new ServerThread(command);
    }
   
    ExecutorService threadPool = cluster.getThreadPool();

    for (int i = 0; i < nodes.length; i++) {
      threadPool.execute(threads[i]);
    }
    waitTillComplete();
   
    // Throw an exception if an error occurred.
    if (exception != null) {
      if (exception instanceof AerospikeException) {
        throw (AerospikeException)exception;   
      }
      else {
        throw new AerospikeException(exception);
      }   
    }   
  }
View Full Code Here

     
      if (resultCode != 0) {
        if (resultCode == ResultCode.KEY_NOT_FOUND_ERROR) {
          return false;
        }
        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

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.