public final class ScheduledContextHolder extends Object
ScheduledContextImpl.ScheduledScope| Modifier and Type | Method and Description |
|---|---|
static ScheduledContext |
getContext()
May be used to access the
ScheduledContext which is currently active for
the current thread. |
static boolean |
isContextActive()
Tests whether the current thread is currently executing a scheduled method.
|
static void |
pop()
Removes the context for the current thread.
|
static void |
push(ScheduledContext context)
Registers the given context to be active for the current thread.
|
public static boolean isContextActive()
public static ScheduledContext getContext()
ScheduledContext which is currently active for
the current thread. Will throw an exception if no context is in place.public static void push(ScheduledContext context)
pop() after the execution of the scoped method is done.context - The context to record as active.public static void pop()
Copyright © 2014–2018. All rights reserved.