ScheduledThreadPoolExecutor.DecorateTask Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
DecorateTask(IRunnable, IRunnableScheduledFuture) |
Modifies or replaces the task used to execute a runnable. |
DecorateTask(ICallable, IRunnableScheduledFuture) |
Modifies or replaces the task used to execute a callable. |
DecorateTask(IRunnable, IRunnableScheduledFuture)
Modifies or replaces the task used to execute a runnable.
[Android.Runtime.Register("decorateTask", "(Ljava/lang/Runnable;Ljava/util/concurrent/RunnableScheduledFuture;)Ljava/util/concurrent/RunnableScheduledFuture;", "GetDecorateTask_Ljava_lang_Runnable_Ljava_util_concurrent_RunnableScheduledFuture_Handler")]
[Java.Interop.JavaTypeParameters(new System.String[] { "V" })]
protected virtual Java.Util.Concurrent.IRunnableScheduledFuture? DecorateTask (Java.Lang.IRunnable? runnable, Java.Util.Concurrent.IRunnableScheduledFuture? task);
[<Android.Runtime.Register("decorateTask", "(Ljava/lang/Runnable;Ljava/util/concurrent/RunnableScheduledFuture;)Ljava/util/concurrent/RunnableScheduledFuture;", "GetDecorateTask_Ljava_lang_Runnable_Ljava_util_concurrent_RunnableScheduledFuture_Handler")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "V" })>]
abstract member DecorateTask : Java.Lang.IRunnable * Java.Util.Concurrent.IRunnableScheduledFuture -> Java.Util.Concurrent.IRunnableScheduledFuture
override this.DecorateTask : Java.Lang.IRunnable * Java.Util.Concurrent.IRunnableScheduledFuture -> Java.Util.Concurrent.IRunnableScheduledFuture
Parameters
- runnable
- IRunnable
the submitted Runnable
the task created to execute the runnable
Returns
a task that can execute the runnable
- Attributes
Remarks
Modifies or replaces the task used to execute a runnable. This method can be used to override the concrete class used for managing internal tasks. The default implementation simply returns the given task.
Added in 1.6.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
DecorateTask(ICallable, IRunnableScheduledFuture)
Modifies or replaces the task used to execute a callable.
[Android.Runtime.Register("decorateTask", "(Ljava/util/concurrent/Callable;Ljava/util/concurrent/RunnableScheduledFuture;)Ljava/util/concurrent/RunnableScheduledFuture;", "GetDecorateTask_Ljava_util_concurrent_Callable_Ljava_util_concurrent_RunnableScheduledFuture_Handler")]
[Java.Interop.JavaTypeParameters(new System.String[] { "V" })]
protected virtual Java.Util.Concurrent.IRunnableScheduledFuture? DecorateTask (Java.Util.Concurrent.ICallable? callable, Java.Util.Concurrent.IRunnableScheduledFuture? task);
[<Android.Runtime.Register("decorateTask", "(Ljava/util/concurrent/Callable;Ljava/util/concurrent/RunnableScheduledFuture;)Ljava/util/concurrent/RunnableScheduledFuture;", "GetDecorateTask_Ljava_util_concurrent_Callable_Ljava_util_concurrent_RunnableScheduledFuture_Handler")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "V" })>]
abstract member DecorateTask : Java.Util.Concurrent.ICallable * Java.Util.Concurrent.IRunnableScheduledFuture -> Java.Util.Concurrent.IRunnableScheduledFuture
override this.DecorateTask : Java.Util.Concurrent.ICallable * Java.Util.Concurrent.IRunnableScheduledFuture -> Java.Util.Concurrent.IRunnableScheduledFuture
Parameters
- callable
- ICallable
the submitted Callable
the task created to execute the callable
Returns
a task that can execute the callable
- Attributes
Remarks
Modifies or replaces the task used to execute a callable. This method can be used to override the concrete class used for managing internal tasks. The default implementation simply returns the given task.
Added in 1.6.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.