次の方法で共有


IScheduledExecutorService.Schedule Method

Definition

Overloads

Schedule(IRunnable, Int64, TimeUnit)

Submits a one-shot task that becomes enabled after the given delay.

Schedule(ICallable, Int64, TimeUnit)

Submits a value-returning one-shot task that becomes enabled after the given delay.

Schedule(IRunnable, Int64, TimeUnit)

Submits a one-shot task that becomes enabled after the given delay.

[Android.Runtime.Register("schedule", "(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;", "GetSchedule_Ljava_lang_Runnable_JLjava_util_concurrent_TimeUnit_Handler:Java.Util.Concurrent.IScheduledExecutorServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Util.Concurrent.IScheduledFuture? Schedule (Java.Lang.IRunnable? command, long delay, Java.Util.Concurrent.TimeUnit? unit);
[<Android.Runtime.Register("schedule", "(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;", "GetSchedule_Ljava_lang_Runnable_JLjava_util_concurrent_TimeUnit_Handler:Java.Util.Concurrent.IScheduledExecutorServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Schedule : Java.Lang.IRunnable * int64 * Java.Util.Concurrent.TimeUnit -> Java.Util.Concurrent.IScheduledFuture

Parameters

command
IRunnable

the task to execute

delay
Int64

the time from now to delay execution

unit
TimeUnit

the time unit of the delay parameter

Returns

a ScheduledFuture representing pending completion of the task and whose get() method will return null upon completion

Attributes

Exceptions

if the task cannot be scheduled for execution

if command is null

Remarks

Submits a one-shot task that becomes enabled after the given delay.

Java documentation for java.util.concurrent.ScheduledExecutorService.schedule(java.lang.Runnable, long, java.util.concurrent.TimeUnit).

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

Schedule(ICallable, Int64, TimeUnit)

Submits a value-returning one-shot task that becomes enabled after the given delay.

[Android.Runtime.Register("schedule", "(Ljava/util/concurrent/Callable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;", "GetSchedule_Ljava_util_concurrent_Callable_JLjava_util_concurrent_TimeUnit_Handler:Java.Util.Concurrent.IScheduledExecutorServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
[Java.Interop.JavaTypeParameters(new System.String[] { "V" })]
public Java.Util.Concurrent.IScheduledFuture? Schedule (Java.Util.Concurrent.ICallable? callable, long delay, Java.Util.Concurrent.TimeUnit? unit);
[<Android.Runtime.Register("schedule", "(Ljava/util/concurrent/Callable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;", "GetSchedule_Ljava_util_concurrent_Callable_JLjava_util_concurrent_TimeUnit_Handler:Java.Util.Concurrent.IScheduledExecutorServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "V" })>]
abstract member Schedule : Java.Util.Concurrent.ICallable * int64 * Java.Util.Concurrent.TimeUnit -> Java.Util.Concurrent.IScheduledFuture

Parameters

callable
ICallable

the function to execute

delay
Int64

the time from now to delay execution

unit
TimeUnit

the time unit of the delay parameter

Returns

a ScheduledFuture that can be used to extract result or cancel

Attributes

Remarks

Submits a value-returning one-shot task that becomes enabled after the given delay.

Java documentation for java.util.concurrent.ScheduledExecutorService.schedule(java.util.concurrent.Callable<V>, long, java.util.concurrent.TimeUnit).

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