Package com.aerospike.client

Examples of com.aerospike.client.AerospikeException


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


      }
     
      if (len <= 8) {
        return LuaInteger.valueOf(Buffer.bytesToLong(buf, offset));
      }
      throw new AerospikeException("Lua BigInteger not implemented.");
   
    case ParticleType.BLOB:
          byte[] blob = new byte[len];
          System.arraycopy(buf, offset, blob, 0, len);
      return new LuaBytes(this, blob);
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);
          }
        }           
  }
View Full Code Here

      }
      catch (IOException ioe) {
                for (int j = 0; j < i; j++) {
                  managers[j].close();
                }
        throw new AerospikeException("Failed to construct event manager: " + Util.getErrorMessage(ioe));
      }
    }
   
    int count = 0;
   
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
      if ((info3 & Command.INFO3_LAST) == Command.INFO3_LAST) {
        return false;
      }
     
      int fieldCount = Buffer.bytesToShort(dataBuffer, 18);
      int opCount = Buffer.bytesToShort(dataBuffer, 20);
     
      parseKey(fieldCount);
     
      if (opCount != 1) {
        throw new AerospikeException("Query aggregate expected exactly one bin.  Received " + opCount);
      }

      // Parse aggregateValue.
        readBytes(8)
      int opSize = Buffer.bytesToInt(dataBuffer, 0);
      byte particleType = dataBuffer[5];
      byte nameSize = dataBuffer[7];
       
      readBytes(nameSize);
      String name = Buffer.utf8ToString(dataBuffer, 0, nameSize);
 
      int particleBytesSize = (int) (opSize - (4 + nameSize));
      readBytes(particleBytesSize);
      LuaValue aggregateValue = instance.getValue(particleType, dataBuffer, 0, particleBytesSize);
           
      if (! name.equals("SUCCESS")) {
        throw new AerospikeException("Query aggregate expected bin name SUCCESS.  Received " + name);
      }
     
      if (! valid) {
        throw new AerospikeException.QueryTerminated();
      }
View Full Code Here

      }
     
      if (len <= 8) {
        return LuaInteger.valueOf(Buffer.bytesToLong(buf, offset));
      }
      throw new AerospikeException("Lua BigInteger not implemented.");
   
    case ParticleType.BLOB:
          byte[] blob = new byte[len];
          System.arraycopy(buf, offset, blob, 0, len);
      return new LuaBytes(this, blob);
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

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.