@Override protected void handleNotFound(int resultCode) { throw new AerospikeException(resultCode); } }
@Override protected void handleNotFound(int resultCode) { // Only throw not found exception for command with write operations. // Read-only command operations return a null record. if (args.hasWrite) { throw new AerospikeException(resultCode); } }
@Override protected void handleNotFound(int resultCode) { // Only throw not found exception for command with write operations. // Read-only command operations return a null record. if (args.hasWrite) { throw new AerospikeException(resultCode); } }
/** * Initialize TLS context. For internal use only. */ public void initTlsContext(TlsPolicy policy) { throw new AerospikeException("TLS not supported in direct NIO event loops"); }
protected final void checkForException() throws AerospikeException { // Throw an exception if an error occurred. if (exception != null) { if (exception instanceof AerospikeException) { throw (AerospikeException)exception; } else { throw new AerospikeException(exception); } } }
protected final void checkForException() throws AerospikeException { // Throw an exception if an error occurred. if (exception != null) { if (exception instanceof AerospikeException) { throw (AerospikeException)exception; } else { throw new AerospikeException(exception); } } }
/** * Initialize TLS context. For internal use only. */ public void initTlsContext(TlsPolicy policy) { throw new AerospikeException("TLS not supported in direct NIO event loops"); }
@Override protected void handleNotFound(int resultCode) { // Only throw not found exception for command with write operations. // Read-only command operations return a null record. if (args.hasWrite) { throw new AerospikeException(resultCode); } }
@Override protected void handleNotFound(int resultCode) { // Only throw not found exception for command with write operations. // Read-only command operations return a null record. if (args.hasWrite) { throw new AerospikeException(resultCode); } }
@Override protected boolean parseResult() { validateHeaderSize(); int resultCode = dataBuffer[5] & 0xFF; if (resultCode != 0) { throw new AerospikeException(resultCode); } return true; }
@Override protected void parseResult(Connection conn) throws IOException { // Read header. conn.readFully(dataBuffer, Command.MSG_TOTAL_HEADER_SIZE, Command.STATE_READ_HEADER); int resultCode = dataBuffer[13] & 0xFF; if (resultCode != 0 && resultCode != ResultCode.KEY_NOT_FOUND_ERROR) { throw new AerospikeException(resultCode); } exists = resultCode == 0; }
@Override protected void parseResult(Connection conn) throws IOException { // Read header. conn.readFully(dataBuffer, Command.MSG_TOTAL_HEADER_SIZE, Command.STATE_READ_HEADER); int resultCode = dataBuffer[13] & 0xFF; if (resultCode != 0 && resultCode != ResultCode.KEY_NOT_FOUND_ERROR) { throw new AerospikeException(resultCode); } exists = resultCode == 0; }
@Override protected void parseResult(Connection conn) throws IOException { // Read header. conn.readFully(dataBuffer, Command.MSG_TOTAL_HEADER_SIZE, Command.STATE_READ_HEADER); int resultCode = dataBuffer[13] & 0xFF; if (resultCode != 0) { throw new AerospikeException(resultCode); } } }
@Override protected void parseResult(Connection conn) throws IOException { // Read header. conn.readFully(dataBuffer, Command.MSG_TOTAL_HEADER_SIZE, Command.STATE_READ_HEADER); int resultCode = dataBuffer[13] & 0xFF; if (resultCode != 0 && resultCode != ResultCode.KEY_NOT_FOUND_ERROR) { throw new AerospikeException(resultCode); } existed = resultCode == 0; }
@Override protected void parseResult(Connection conn) throws IOException { // Read header. conn.readFully(dataBuffer, Command.MSG_TOTAL_HEADER_SIZE, Command.STATE_READ_HEADER); int resultCode = dataBuffer[13] & 0xFF; if (resultCode != 0) { throw new AerospikeException(resultCode); } } }
@Override protected boolean parseResult() { validateHeaderSize(); int resultCode = dataBuffer[5] & 0xFF; if (resultCode != 0) { throw new AerospikeException(resultCode); } return true; }
@Override protected void parseResult(Connection conn) throws IOException { // Read header. conn.readFully(dataBuffer, Command.MSG_TOTAL_HEADER_SIZE, Command.STATE_READ_HEADER); int resultCode = dataBuffer[13] & 0xFF; if (resultCode != 0) { throw new AerospikeException(resultCode); } } }
@Override protected boolean parseResult() { validateHeaderSize(); int resultCode = dataBuffer[5] & 0xFF; if (resultCode != 0) { throw new AerospikeException(resultCode); } return true; }
public static void validate(Node node, String namespace, long expectedKey) { if (expectedKey == 0 || ! node.hasClusterStable()) { return; } // Fail when cluster is in migration. long clusterKey = validateBegin(node, namespace); if (clusterKey != expectedKey) { throw new AerospikeException(ResultCode.QUERY_ABORTED, "Cluster is in migration: " + expectedKey + ' ' + clusterKey); } } }
public static void validate(Node node, String namespace, long expectedKey) { if (expectedKey == 0 || ! node.hasClusterStable()) { return; } // Fail when cluster is in migration. long clusterKey = validateBegin(node, namespace); if (clusterKey != expectedKey) { throw new AerospikeException(ResultCode.QUERY_ABORTED, "Cluster is in migration: " + expectedKey + ' ' + clusterKey); } } }