Package com.aerospike.client

Examples of com.aerospike.client.AerospikeException


   
    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

        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

          resizeReceiveBuffer(receiveSize);
        readFully(is, receiveBuffer, receiveSize);
        }
       
      if (resultCode != 0) {
        throw new AerospikeException(resultCode);         
      }         
  }
View Full Code Here

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

    }

    if (! name.equals(infoName)) {
      // Set node to inactive immediately.
      active = false;
      throw new AerospikeException("Node name has changed. Old=" + name + " New=" + infoName);
    }
  }
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 (resultCode != 0) {
        if (resultCode == ResultCode.KEY_NOT_FOUND_ERROR) {
          return false;
        }
        throw new AerospikeException(resultCode);
      }

      byte info3 = receiveBuffer[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(receiveBuffer, 18);
      int opCount = Buffer.bytesToShort(receiveBuffer, 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(receiveBuffer, 0);
      byte particleType = receiveBuffer[5];
      byte nameSize = receiveBuffer[7];
       
      readBytes(nameSize);
      String name = Buffer.utf8ToString(receiveBuffer, 0, nameSize);
 
      int particleBytesSize = (int) (opSize - (4 + nameSize));
      readBytes(particleBytesSize);
      LuaValue aggregateValue = instance.getValue(particleType, receiveBuffer, 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 (resultCode != 0) {
        if (resultCode == ResultCode.KEY_NOT_FOUND_ERROR) {
          return false;
        }
        throw new AerospikeException(resultCode);
      }

      byte info3 = receiveBuffer[3];
     
      // If this is the end marker of the response, do not proceed further
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.