Package org.eclipse.jetty.util.thread
Interface Invocable
-
- All Known Subinterfaces:
Callback
- All Known Implementing Classes:
BlockingWriteCallback.WriteBlocker
,Callback.Completable
,Callback.Completing
,Callback.Nested
,CompletableCallback
,CountingCallback
,DeferredContentProvider
,DisconnectCallback
,FrameFlusher
,FutureCallback
,FutureWriteCallback
,HttpContent
,HttpDestination
,HttpDestinationOverHTTP
,HttpInput.Content
,HttpInput.EofContent
,HttpInput.SentinelContent
,InputStreamContentProvider
,IteratingCallback
,IteratingNestedCallback
,MultiplexHttpDestination
,OutputStreamContentProvider
,PoolingHttpDestination
,SharedBlockingCallback.Blocker
@Deprecated(since="2021-05-27") public interface Invocable
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.A task (typically either a
Runnable
orCallable
that declares how it will behave when invoked:- blocking, the invocation will certainly block (e.g. performs blocking I/O)
- non-blocking, the invocation will certainly not block
- either, the invocation may block
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Invocable.InvocationType
Deprecated.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.ThreadLocal<java.lang.Boolean>
__nonBlocking
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description static Invocable.InvocationType
combine(Invocable.InvocationType it1, Invocable.InvocationType it2)
Deprecated.default Invocable.InvocationType
getInvocationType()
Deprecated.static Invocable.InvocationType
getInvocationType(java.lang.Object o)
Deprecated.Get the invocation type of an Object.static void
invokeNonBlocking(java.lang.Runnable task)
Deprecated.Invoke a task with the calling thread, tagged to indicate that it will not block.static boolean
isNonBlockingInvocation()
Deprecated.Test if the current thread has been tagged as non blocking
-
-
-
Method Detail
-
isNonBlockingInvocation
static boolean isNonBlockingInvocation()
Deprecated.Test if the current thread has been tagged as non blocking- Returns:
- True if the task the current thread is running has indicated that it will not block.
-
invokeNonBlocking
static void invokeNonBlocking(java.lang.Runnable task)
Deprecated.Invoke a task with the calling thread, tagged to indicate that it will not block.- Parameters:
task
- The task to invoke.
-
combine
static Invocable.InvocationType combine(Invocable.InvocationType it1, Invocable.InvocationType it2)
Deprecated.
-
getInvocationType
static Invocable.InvocationType getInvocationType(java.lang.Object o)
Deprecated.Get the invocation type of an Object.- Parameters:
o
- The object to check the invocation type of.- Returns:
- If the object is an Invocable, it is coerced and the
getInvocationType()
used, otherwiseInvocable.InvocationType.BLOCKING
is returned.
-
getInvocationType
default Invocable.InvocationType getInvocationType()
Deprecated.- Returns:
- The InvocationType of this object
-
-