public interface Invocable
A task (typically either a Runnable or Callable
that declares how it will behave when invoked:
Static methods and are provided that allow the current thread to be tagged
with a ThreadLocal to indicate if it has a blocking invocation type.
| Modifier and Type | Interface and Description |
|---|---|
static class |
Invocable.InvocationType |
| Modifier and Type | Field and Description |
|---|---|
static ThreadLocal<Boolean> |
__nonBlocking |
| Modifier and Type | Method and Description |
|---|---|
default Invocable.InvocationType |
getInvocationType() |
static Invocable.InvocationType |
getInvocationType(Object o)
Get the invocation type of an Object.
|
static void |
invokeNonBlocking(Runnable task)
Invoke a task with the calling thread, tagged to indicate
that it will not block.
|
static boolean |
isNonBlockingInvocation()
Test if the current thread has been tagged as non blocking
|
static final ThreadLocal<Boolean> __nonBlocking
static boolean isNonBlockingInvocation()
static void invokeNonBlocking(Runnable task)
task - The task to invoke.static Invocable.InvocationType getInvocationType(Object o)
o - The object to check the invocation type of.getInvocationType()
used, otherwise Invocable.InvocationType.BLOCKING is returned.default Invocable.InvocationType getInvocationType()
Copyright © 1995–2018 Webtide. All rights reserved.