Package com.aerospike.client

Examples of com.aerospike.client.AerospikeException


          if (stopOnNotFound) {
            return true;
          }
        }
        else {
          throw new AerospikeException(resultCode);
        }
      }

      // If this is the end marker of the response, do not proceed further
      if ((receiveBuffer[receiveOffset + 3] & Command.INFO3_LAST) != 0) {
View Full Code Here


  protected void parseResult(ByteBuffer byteBuffer) throws AerospikeException {
    int resultCode = byteBuffer.get(5) & 0xFF;
   
    if (resultCode != 0) {
      throw new AerospikeException(resultCode);
    }
  }
View Full Code Here

          }         
          command.conn.register(command, selector);
        }
        catch (Exception e) {
          // Connection will be released in this method.
          command.failConnection(new AerospikeException(e));
        }       
      }     
    }
View Full Code Here

        }
        catch (IOException ioe) {
      command.failCommand(ioe);
        }
        catch (Exception e) {
      command.failCommand(new AerospikeException(e));
        }
    }
View Full Code Here

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

        throw ce;
      }
    }
    catch (Exception e) {
      if (!failOnApplicationInit()) {
        throw new AerospikeException(e);
      }
    }
  }
View Full Code Here

        catch (AerospikeException ae) {
      // Fail without retry on non-network errors.
      failOnApplicationError(ae);
        }
        catch (IOException ioe) {
          retryAfterInit(new AerospikeException(ioe));
        }
        catch (Exception e) {
      // Fail without retry on unknown errors.
      failOnApplicationError(new AerospikeException(e));
        }
  }
View Full Code Here

      statement.taskId = r.nextInt(Integer.MAX_VALUE);
    }
   
    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

    this.statement = statement;
   
    this.nodes = cluster.getNodes();

    if (this.nodes.length == 0) {
      throw new AerospikeException(ResultCode.SERVER_NOT_AVAILABLE, "Query failed because cluster is empty.");
    }

    this.threadPool = cluster.getThreadPool();
    this.threads = new QueryThread[nodes.length];
  }
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.