class AuditQueryHandler implements QueryHandler {

    @Override
    public ResultMessage processBatch(BatchStatement statement, QueryState state, BatchQueryOptions options,
                                      Map<String, ByteBuffer> customPayload) throws RequestExecutionException, RequestValidationException
    {
        UUID uuid = UUIDGen.getTimeUUID();
        long timestamp = System.currentTimeMillis();
        auditAdapter.auditBatch(statement, uuid, state.getClientState(), options, Status.ATTEMPT, timestamp);
        try
        {
            ResultMessage result = wrappedQueryHandler.processBatch(statement, state, options, customPayload);
            auditAdapter.auditBatch(statement, uuid, state.getClientState(), options, Status.SUCCEEDED, timestamp);
            return result;
        }
        catch (RuntimeException e)
        {
            auditAdapter.auditBatch(statement, uuid, state.getClientState(), options, Status.FAILED, timestamp);
            throw e;
        }
    }

    public  AuditQueryHandler();
    public  AuditQueryHandler(QueryHandler queryHandler);
    @VisibleForTesting  AuditQueryHandler(QueryHandler queryHandler, AuditAdapter auditAdapter);

}