Package com.blacklocus.qs.worker.model

Examples of com.blacklocus.qs.worker.model.QSLogModel


        ImmutableMap<String, ImmutableMap<String, String>> exceptionDetails = ImmutableMap.of("exception", ImmutableMap.of(
                "class", throwable.getClass().getName(),
                "message", throwable.getMessage(),
                "stackTrace", ExceptionUtils.getStackTrace(throwable)
        ));
        QSLogModel logTick = createLogTickModel(task, exceptionDetails);
        if (LOG.isDebugEnabled()) {
            LOG.debug("Task erred: {}", logTick, throwable);
        } else {
            LOG.info("Task erred: {}", logTick);
        }
View Full Code Here


    @Override
    public void withFuture(TaskHandle taskHandle, Future<Pair<TaskHandle, Object>> future) {
    }

    private QSLogModel createLogTickModel(QSTaskModel task, Object contents) {
        return new QSLogModel(task.taskId, workerIdService.getWorkerId(), task.handler, System.currentTimeMillis(), contents);
    }
View Full Code Here

            this.task = task;
        }

        @Override
        public void log(Object contents) {
            QSLogModel logTick = createLogTickModel(task, contents);
            LOG.debug("{}", logTick); // prevents logTick.toString invocation unless debug-enabled
            logService.log(logTick);
        }
View Full Code Here

        this.tick = tick;
        this.contents = new HandlerWrapper(handler, contents);
    }

    public QSLogModel toNormalModel() {
        return new QSLogModel(taskId, workerId, handler, tick, contents.get(handler));
    }
View Full Code Here

        ImmutableMap<String, ImmutableMap<String, String>> exceptionDetails = ImmutableMap.of("exception", ImmutableMap.of(
                "class", throwable.getClass().getName(),
                "message", throwable.getMessage(),
                "stackTrace", ExceptionUtils.getStackTrace(throwable)
        ));
        QSLogModel logTick = new QSLogModel(task.taskId, workerIdService.getWorkerId(), task.handler, System.currentTimeMillis(), exceptionDetails);
        if (LOG.isDebugEnabled()) {
            LOG.debug("Task erred: {}", logTick, throwable);
        } else {
            LOG.info("Task erred: {}", logTick);
        }
View Full Code Here

    public P params() {
        return params;
    }

    public void log(Object content) {
        QSLogModel logTick = new QSLogModel(task.taskId, workerIdService.getWorkerId(), task.handler, System.currentTimeMillis(), content);
        LOG.debug("{}", logTick); // prevents logTick.toString invocation unless debug-enabled
        logService.log(logTick);
    }
View Full Code Here

    public P params() {
        return params;
    }

    public void log(Object content) {
        QSLogModel logTick = new QSLogModel(task.taskId, workerIdService.getWorkerId(), task.handler, System.currentTimeMillis(), content);
        LOG.debug("{}", logTick); // prevents logTick.toString invocation unless debug-enabled
        logService.log(logTick);
    }
View Full Code Here

        ImmutableMap<String, ImmutableMap<String, String>> exceptionDetails = ImmutableMap.of("exception", ImmutableMap.of(
                "class", throwable.getClass().getName(),
                "message", throwable.getMessage(),
                "stackTrace", ExceptionUtils.getStackTrace(throwable)
        ));
        QSLogModel logTick = createLogTickModel(task, exceptionDetails);
        if (LOG.isDebugEnabled()) {
            LOG.debug("Task erred: {}", logTick, throwable);
        } else {
            LOG.info("Task erred: {}", logTick);
        }
View Full Code Here

        queueingStrategy.onAfterRemove(task);
    }

    private QSLogModel createLogTickModel(QSTaskModel task, Object contents) {
        return new QSLogModel(task.taskId, workerIdService.getWorkerId(), task.handler, System.currentTimeMillis(), contents);
    }
View Full Code Here

TOP

Related Classes of com.blacklocus.qs.worker.model.QSLogModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.