src/main/java/com/github/ddth/cql/SessionManager.java
public void executeBatchAsync(FutureCallback<ResultSet> callback, Statement... statements)
            throws ExceedMaxAsyncJobsException {
        if (!asyncSemaphore.tryAcquire()) {
            if (callback == null) {
                throw new ExceedMaxAsyncJobsException(maxSyncJobs);
            } else {
                callback.onFailure(new ExceedMaxAsyncJobsException(maxSyncJobs));
            }
        } else {
            try {
                ResultSetFuture rsf = CqlUtils.executeBatchAsync(getSession(), statements);
                if (callback != null) {
                    Futures.addCallback(rsf, wrapCallbackResultSet(callback), asyncExecutor);
                }
            } catch (Exception e) {
                asyncSemaphore.release();
                LOGGER.error(e.getMessage(), e);
            }
        }
    }
public void executeBatchAsync(FutureCallback<ResultSet> callback, Statement... statements)
            throws ExceedMaxAsyncJobsException {
        if (!asyncSemaphore.tryAcquire()) {
            if (callback == null) {
                throw new ExceedMaxAsyncJobsException(maxSyncJobs);
            } else {
                callback.onFailure(new ExceedMaxAsyncJobsException(maxSyncJobs));
            }
        } else {
            try {
                ResultSetFuture rsf = CqlUtils.executeBatchAsync(getSession(), statements);
                if (callback != null) {
                    Futures.addCallback(rsf, wrapCallbackResultSet(callback), asyncExecutor);
                }
            } catch (Exception e) {
                asyncSemaphore.release();
                LOGGER.error(e.getMessage(), e);
            }
        }
    }
Async-execute a batch statement.

<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 statements
@throws ExceedMaxAsyncJobsException
If number of running jobs exceeds a threshold <i>and</i> {@code callback} is
{@code null}.
@since 0.4.0