public EventBundleBulkRunner(List<EventListenerDescriptor> listeners, EventBundle bundle) { this.listeners = listeners; this.bundle = bundle; callerThread = SequenceTracer.getThreadName(); }
public EventBundleRunner(List<EventListenerDescriptor> listeners, EventBundle bundle) { this.listeners = listeners; this.bundle = bundle; callerThread = SequenceTracer.getThreadName(); }
public AbstractWork(String id) { this.id = id; progress = PROGRESS_INDETERMINATE; schedulingTime = System.currentTimeMillis(); callerThread = SequenceTracer.getThreadName(); }
/** * Constructs a {@link Work} instance with a unique id. */ public AbstractWork() { // we user RANDOM to deal with these cases: // - several calls in the time granularity of nanoTime() // - several concurrent calls on different servers this(System.nanoTime() + "." + (RANDOM.nextInt() & 0x7fffffff)); callerThread = SequenceTracer.getThreadName(); }
/** * Mark an event. */ public static void mark(String message) { if (!log.isDebugEnabled()) { return; } final String tn = getThreadName(); log.debug(PREFIX + tn + " -> " + tn + ": " + message); }
/** * Add a note on the current thread */ public static void addNote(String message) { if (!log.isDebugEnabled()) { return; } log.debug(PREFIX + "note right of " + getThreadName() + ": " + message); }
/** * Link from source to current thread. */ public static void addRelation(String source, String message) { if (!log.isDebugEnabled()) { return; } log.debug(PREFIX + source + " --> " + getThreadName() + ": " + format(message)); }
/** * Mark the end of the previous action. */ public static void stop(String message) { if (!log.isDebugEnabled()) { return; } final String tn = getThreadName(); log.debug(PREFIX + tn + " -> " + tn + ": " + format(message) + "\n" + PREFIX + "deactivate " + tn); }
/** * Mark the last action as failure */ public static void destroy(String message) { if (!log.isDebugEnabled()) { return; } final String tn = getThreadName(); log.debug(PREFIX + tn + " -> " + tn + ": " + format(message) + "\n" + PREFIX + "destroy " + tn); }
/** * Mark the beginning of an action */ public static void start(String message, String color) { if (!log.isDebugEnabled()) { return; } final String tn = getThreadName(); log.debug(PREFIX + tn + " -> " + tn + ": " + format(message) + "\n" + PREFIX + "activate " + tn + " " + color); }
/** * Mark the beginning of an action initiated by the caller. */ public static void startFrom(final String callerThread, final String message, final String color) { if (!log.isDebugEnabled()) { return; } final String tn = getThreadName(); log.debug(PREFIX + sanitize(callerThread) + " o--> " + tn + ": Initiate\n" + PREFIX + tn + " -> " + tn + ": " + format(message) + "\n" + PREFIX + "activate " + tn + " " + color); }