class AuditQueryHandler implements QueryHandler {

    @Override
    public ResultMessage process(String query, QueryState state, QueryOptions options,
                                 Map<String, ByteBuffer> customPayload) throws RequestExecutionException, RequestValidationException
    {
        long timestamp = System.currentTimeMillis();
        auditAdapter.auditRegular(query, state.getClientState(), Status.ATTEMPT, timestamp);
        try
        {
            ResultMessage result = wrappedQueryHandler.process(query, state, options, customPayload);
            auditAdapter.auditRegular(query, state.getClientState(), Status.SUCCEEDED, timestamp);
            return result;
        }
        catch (RuntimeException e)
        {
            auditAdapter.auditRegular(query, state.getClientState(), Status.FAILED, timestamp);
            throw e;
        }
    }

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

}