Compartir a través de


ScheduledThreadPoolExecutor.DecorateTask Method

Definition

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

task
IRunnableScheduledFuture

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.

Java documentation for java.util.concurrent.ScheduledThreadPoolExecutor.decorateTask(java.lang.Runnable, java.util.concurrent.RunnableScheduledFuture<V>).

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

task
IRunnableScheduledFuture

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.

Java documentation for java.util.concurrent.ScheduledThreadPoolExecutor.decorateTask(java.util.concurrent.Callable<V>, java.util.concurrent.RunnableScheduledFuture<V>).

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