/** * Async-execute a query. * * <p> * The default session (obtained via {@link #getSession()} is used to execute the query. * </p> * * @param callback * {@link ExceedMaxAsyncJobsException} will be passed to * {@link FutureCallback#onFailure(Throwable)} if number of async-jobs exceeds * {@link #getMaxAsyncJobs()}. * @param stm * @throws ExceedMaxAsyncJobsException * If number of running jobs exceeds a threshold <i>and</i> {@code callback} is * {@code null}. * @since 0.4.0.2 */ public void executeOneAsync(FutureCallback<Row> callback, Statement stm) throws ExceedMaxAsyncJobsException { executeOneAsync(callback, stm, null); }
/** * Async-execute a query. * * <p> * The default session (obtained via {@link #getSession()} is used to execute the query. * </p> * * @param callback * {@link ExceedMaxAsyncJobsException} will be passed to * {@link FutureCallback#onFailure(Throwable)} if number of async-jobs exceeds * {@link #getMaxAsyncJobs()}. * @param permitTimeoutMs * wait up to this milliseconds before failing the execution with * {@code ExceedMaxAsyncJobsException} * @param stm * @throws InterruptedException * @throws ExceedMaxAsyncJobsException * If number of running jobs exceeds a threshold <i>and</i> {@code callback} is * {@code null}. * @since 0.4.0.2 */ public void executeOneAsync(FutureCallback<Row> callback, long permitTimeoutMs, Statement stm) throws InterruptedException, ExceedMaxAsyncJobsException { executeOneAsync(callback, permitTimeoutMs, stm, null); }
try { if (stm != null) { sessionManager.executeOneAsync(this, permitTimeoutMs, stm, consistencyLevel); } else if (pstm != null) { if (bindValuesArr != null) { sessionManager.executeOneAsync(this, permitTimeoutMs, pstm, consistencyLevel, bindValuesArr); } else { sessionManager.executeOneAsync(this, permitTimeoutMs, pstm, consistencyLevel, bindValuesMap); sessionManager.executeOneAsync(this, permitTimeoutMs, cql, consistencyLevel, bindValuesArr); } else { sessionManager.executeOneAsync(this, permitTimeoutMs, cql, consistencyLevel, bindValuesMap);
throws InterruptedException, ExceedMaxAsyncJobsException { if (permitTimeoutMs <= 0) { executeOneAsync(callback, stm, bindValues); } else if (!asyncSemaphore.tryAcquire(permitTimeoutMs, TimeUnit.MILLISECONDS)) { if (callback == null) {
throws InterruptedException, ExceedMaxAsyncJobsException { if (permitTimeoutMs <= 0) { executeOneAsync(callback, stm, bindValues); } else if (!asyncSemaphore.tryAcquire(permitTimeoutMs, TimeUnit.MILLISECONDS)) { if (callback == null) {
Object... bindValues) throws InterruptedException, ExceedMaxAsyncJobsException { if (permitTimeoutMs <= 0) { executeOneAsync(callback, cql, bindValues); } else if (!asyncSemaphore.tryAcquire(permitTimeoutMs, TimeUnit.MILLISECONDS)) { if (callback == null) {
throws InterruptedException, ExceedMaxAsyncJobsException { if (permitTimeoutMs <= 0) { executeOneAsync(callback, cql, consistencyLevel, bindValues); } else if (!asyncSemaphore.tryAcquire(permitTimeoutMs, TimeUnit.MILLISECONDS)) { if (callback == null) {
throws InterruptedException, ExceedMaxAsyncJobsException { if (permitTimeoutMs <= 0) { executeOneAsync(callback, stm, consistencyLevel, bindValues); } else if (!asyncSemaphore.tryAcquire(permitTimeoutMs, TimeUnit.MILLISECONDS)) { if (callback == null) {
throws InterruptedException, ExceedMaxAsyncJobsException { if (permitTimeoutMs <= 0) { executeOneAsync(callback, cql, bindValues); } else if (!asyncSemaphore.tryAcquire(permitTimeoutMs, TimeUnit.MILLISECONDS)) { if (callback == null) {
throws InterruptedException, ExceedMaxAsyncJobsException { if (permitTimeoutMs <= 0) { executeOneAsync(callback, cql, consistencyLevel, bindValues); } else if (!asyncSemaphore.tryAcquire(permitTimeoutMs, TimeUnit.MILLISECONDS)) { if (callback == null) {
throws InterruptedException, ExceedMaxAsyncJobsException { if (permitTimeoutMs <= 0) { executeOneAsync(callback, stm, consistencyLevel, bindValues); } else if (!asyncSemaphore.tryAcquire(permitTimeoutMs, TimeUnit.MILLISECONDS)) { if (callback == null) {
throws InterruptedException, ExceedMaxAsyncJobsException { if (permitTimeoutMs <= 0) { executeOneAsync(callback, stm, consistencyLevel); } else if (!asyncSemaphore.tryAcquire(permitTimeoutMs, TimeUnit.MILLISECONDS)) { if (callback == null) {