src/main/java/com/github/ddth/cql/SessionManager.java
private FutureCallback<ResultSet> wrapCallbackResultSet(FutureCallback<ResultSet> callback) {
        return new FutureCallback<ResultSet>() {
            @Override
            public void onSuccess(ResultSet result) {
                try {
                    callback.onSuccess(result);
                } finally {
                    asyncSemaphore.release();
                }
            }

            @Override
            public void onFailure(Throwable t) {
                try {
                    callback.onFailure(t);
                } finally {
                    asyncSemaphore.release();
                }
            }
        };
    }
private FutureCallback<ResultSet> wrapCallbackResultSet(FutureCallback<ResultSet> callback) {
        return new FutureCallback<ResultSet>() {
            @Override
            public void onSuccess(ResultSet result) {
                try {
                    callback.onSuccess(result);
                } finally {
                    asyncSemaphore.release();
                }
            }

            @Override
            public void onFailure(Throwable t) {
                try {
                    callback.onFailure(t);
                } finally {
                    asyncSemaphore.release();
                }
            }
        };
    }
private FutureCallback < ResultSet > wrapCallbackResultSet ( FutureCallback < ResultSet > callback ) { return new FutureCallback < ResultSet > ( ) { @ Override public void onSuccess ( ResultSet result ) { try { callback . onSuccess ( result ) ; } finally { asyncSemaphore . release ( ) ; } } @ Override public void onFailure ( Throwable t ) { try { callback . onFailure ( t ) ; } finally { asyncSemaphore . release ( ) ; } } } ; }
/*----------------------------------------------------------------------
/ * ----------------------------------------------------------------------