-
Notifications
You must be signed in to change notification settings - Fork 0
/
IScheduledExecutorService.xml
355 lines (352 loc) · 26.4 KB
/
IScheduledExecutorService.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
<Type Name="IScheduledExecutorService" FullName="Java.Util.Concurrent.IScheduledExecutorService">
<TypeSignature Language="C#" Value="public interface IScheduledExecutorService : IDisposable, Java.Interop.IJavaPeerable, Java.Util.Concurrent.IExecutorService" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract beforefieldinit IScheduledExecutorService implements class Android.Runtime.IJavaObject, class Java.Interop.IJavaPeerable, class Java.Util.Concurrent.IExecutor, class Java.Util.Concurrent.IExecutorService, class System.IDisposable" />
<TypeSignature Language="DocId" Value="T:Java.Util.Concurrent.IScheduledExecutorService" />
<TypeSignature Language="F#" Value="type IScheduledExecutorService = interface
 interface IExecutorService
 interface IExecutor
 interface IJavaObject
 interface IDisposable
 interface IJavaPeerable" />
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Interfaces>
<Interface>
<InterfaceName>Android.Runtime.IJavaObject</InterfaceName>
</Interface>
<Interface>
<InterfaceName>Java.Interop.IJavaPeerable</InterfaceName>
</Interface>
<Interface>
<InterfaceName>Java.Util.Concurrent.IExecutor</InterfaceName>
</Interface>
<Interface>
<InterfaceName>Java.Util.Concurrent.IExecutorService</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("java/util/concurrent/ScheduledExecutorService", "", "Java.Util.Concurrent.IScheduledExecutorServiceInvoker")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("java/util/concurrent/ScheduledExecutorService", "", "Java.Util.Concurrent.IScheduledExecutorServiceInvoker")>]</AttributeName>
</Attribute>
</Attributes>
<Docs since="1">
<summary>An <c>ExecutorService</c> that can schedule commands to run after a given
delay, or to execute periodically.</summary>
<remarks>
<para>An <c>ExecutorService</c> that can schedule commands to run after a given
delay, or to execute periodically.</para>
<para>The <c>schedule</c> methods create tasks with various delays
and return a task object that can be used to cancel or check
execution. The <c>scheduleAtFixedRate</c> and
<c>scheduleWithFixedDelay</c> methods create and execute tasks
that run periodically until cancelled.</para>
<para>Commands submitted using the <c>Executor#execute(Runnable)</c>
and <c>ExecutorService</c><c>submit</c> methods are scheduled
with a requested delay of zero. Zero and negative delays (but not
periods) are also allowed in <c>schedule</c> methods, and are
treated as requests for immediate execution.</para>
<para>All <c>schedule</c> methods accept <em>relative</em> delays and
periods as arguments, not absolute times or dates. It is a simple
matter to transform an absolute time represented as a <c>java.util.Date</c> to the required form. For example, to schedule at
a certain future <c>date</c>, you can use: <c>schedule(task,
date.getTime() - System.currentTimeMillis(),
TimeUnit.MILLISECONDS)</c>. Beware however that expiration of a
relative delay need not coincide with the current <c>Date</c> at
which the task is enabled due to network time synchronization
protocols, clock drift, or other factors.</para>
<para>The <c>Executors</c> class provides convenient factory methods for
the ScheduledExecutorService implementations provided in this package.
<h2>Usage Example</h2>
Here is a class with a method that sets up a ScheduledExecutorService
to beep every ten seconds for an hour:</para>
<code lang="text/java">{@code
import static java.util.concurrent.TimeUnit.*;
class BeeperControl {
private final ScheduledExecutorService scheduler =
Executors.newScheduledThreadPool(1);
public void beepForAnHour() {
Runnable beeper = () -> System.out.println("beep");
ScheduledFuture<?> beeperHandle =
scheduler.scheduleAtFixedRate(beeper, 10, 10, SECONDS);
Runnable canceller = () -> beeperHandle.cancel(false);
scheduler.schedule(canceller, 1, HOURS);
}
}}</code>
<para>Added in 1.5.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/concurrent/ScheduledExecutorService" title="Reference documentation">Java documentation for <code>java.util.concurrent.ScheduledExecutorService</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
</Docs>
<Members>
<Member MemberName="Schedule">
<MemberSignature Language="C#" Value="public Java.Util.Concurrent.IScheduledFuture? Schedule (Java.Lang.IRunnable? command, long delay, Java.Util.Concurrent.TimeUnit? unit);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Java.Util.Concurrent.IScheduledFuture Schedule(class Java.Lang.IRunnable command, int64 delay, class Java.Util.Concurrent.TimeUnit unit) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.Concurrent.IScheduledExecutorService.Schedule(Java.Lang.IRunnable,System.Int64,Java.Util.Concurrent.TimeUnit)" />
<MemberSignature Language="F#" Value="abstract member Schedule : Java.Lang.IRunnable * int64 * Java.Util.Concurrent.TimeUnit -> Java.Util.Concurrent.IScheduledFuture" Usage="iScheduledExecutorService.Schedule (command, delay, unit)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[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")]</AttributeName>
<AttributeName Language="F#">[<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")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Util.Concurrent.IScheduledFuture</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="command" Type="Java.Lang.IRunnable" />
<Parameter Name="delay" Type="System.Int64" />
<Parameter Name="unit" Type="Java.Util.Concurrent.TimeUnit" />
</Parameters>
<Docs>
<param name="command">the task to execute</param>
<param name="delay">the time from now to delay execution</param>
<param name="unit">the time unit of the delay parameter</param>
<summary>Submits a one-shot task that becomes enabled after the given delay.</summary>
<returns>a ScheduledFuture representing pending completion of
the task and whose <c>get()</c> method will return
<c>null</c> upon completion</returns>
<remarks>
<para>Submits a one-shot task that becomes enabled after the given delay.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/concurrent/ScheduledExecutorService#schedule(java.lang.Runnable,%20long,%20java.util.concurrent.TimeUnit)" title="Reference documentation">Java documentation for <code>java.util.concurrent.ScheduledExecutorService.schedule(java.lang.Runnable, long, java.util.concurrent.TimeUnit)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
<exception cref="T:Java.Util.Concurrent.RejectedExecutionException">if the task cannot be
scheduled for execution</exception>
<exception cref="T:Java.Lang.NullPointerException">if command is null
</exception>
</Docs>
</Member>
<Member MemberName="Schedule">
<MemberSignature Language="C#" Value="public Java.Util.Concurrent.IScheduledFuture? Schedule (Java.Util.Concurrent.ICallable? callable, long delay, Java.Util.Concurrent.TimeUnit? unit);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Java.Util.Concurrent.IScheduledFuture Schedule(class Java.Util.Concurrent.ICallable callable, int64 delay, class Java.Util.Concurrent.TimeUnit unit) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.Concurrent.IScheduledExecutorService.Schedule(Java.Util.Concurrent.ICallable,System.Int64,Java.Util.Concurrent.TimeUnit)" />
<MemberSignature Language="F#" Value="abstract member Schedule : Java.Util.Concurrent.ICallable * int64 * Java.Util.Concurrent.TimeUnit -> Java.Util.Concurrent.IScheduledFuture" Usage="iScheduledExecutorService.Schedule (callable, delay, unit)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[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")]</AttributeName>
<AttributeName Language="F#">[<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")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[Java.Interop.JavaTypeParameters(new System.String[] { "V" })]</AttributeName>
<AttributeName Language="F#">[<Java.Interop.JavaTypeParameters(new System.String[] { "V" })>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Util.Concurrent.IScheduledFuture</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="callable" Type="Java.Util.Concurrent.ICallable" />
<Parameter Name="delay" Type="System.Int64" />
<Parameter Name="unit" Type="Java.Util.Concurrent.TimeUnit" />
</Parameters>
<Docs>
<param name="callable">the function to execute</param>
<param name="delay">the time from now to delay execution</param>
<param name="unit">the time unit of the delay parameter</param>
<param name="<V><V>">the type of the callable's result</param>
<summary>Submits a value-returning one-shot task that becomes enabled
after the given delay.</summary>
<returns>a ScheduledFuture that can be used to extract result or cancel</returns>
<remarks>
<para>Submits a value-returning one-shot task that becomes enabled
after the given delay.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/concurrent/ScheduledExecutorService#schedule(java.util.concurrent.Callable%3CV%3E,%20long,%20java.util.concurrent.TimeUnit)" title="Reference documentation">Java documentation for <code>java.util.concurrent.ScheduledExecutorService.schedule(java.util.concurrent.Callable<V>, long, java.util.concurrent.TimeUnit)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
</Docs>
</Member>
<Member MemberName="ScheduleAtFixedRate">
<MemberSignature Language="C#" Value="public Java.Util.Concurrent.IScheduledFuture? ScheduleAtFixedRate (Java.Lang.IRunnable? command, long initialDelay, long period, Java.Util.Concurrent.TimeUnit? unit);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Java.Util.Concurrent.IScheduledFuture ScheduleAtFixedRate(class Java.Lang.IRunnable command, int64 initialDelay, int64 period, class Java.Util.Concurrent.TimeUnit unit) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.Concurrent.IScheduledExecutorService.ScheduleAtFixedRate(Java.Lang.IRunnable,System.Int64,System.Int64,Java.Util.Concurrent.TimeUnit)" />
<MemberSignature Language="F#" Value="abstract member ScheduleAtFixedRate : Java.Lang.IRunnable * int64 * int64 * Java.Util.Concurrent.TimeUnit -> Java.Util.Concurrent.IScheduledFuture" Usage="iScheduledExecutorService.ScheduleAtFixedRate (command, initialDelay, period, unit)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("scheduleAtFixedRate", "(Ljava/lang/Runnable;JJLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;", "GetScheduleAtFixedRate_Ljava_lang_Runnable_JJLjava_util_concurrent_TimeUnit_Handler:Java.Util.Concurrent.IScheduledExecutorServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("scheduleAtFixedRate", "(Ljava/lang/Runnable;JJLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;", "GetScheduleAtFixedRate_Ljava_lang_Runnable_JJLjava_util_concurrent_TimeUnit_Handler:Java.Util.Concurrent.IScheduledExecutorServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Util.Concurrent.IScheduledFuture</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="command" Type="Java.Lang.IRunnable" />
<Parameter Name="initialDelay" Type="System.Int64" />
<Parameter Name="period" Type="System.Int64" />
<Parameter Name="unit" Type="Java.Util.Concurrent.TimeUnit" />
</Parameters>
<Docs>
<param name="command">the task to execute</param>
<param name="initialDelay">the time to delay first execution</param>
<param name="period">the period between successive executions</param>
<param name="unit">the time unit of the initialDelay and period parameters</param>
<summary>Submits a periodic action that becomes enabled first after the
given initial delay, and subsequently with the given period;
that is, executions will commence after
<c>initialDelay</c>, then <c>initialDelay + period</c>, then
<c>initialDelay + 2 * period</c>, and so on.</summary>
<returns>a ScheduledFuture representing pending completion of
the series of repeated tasks. The future's <c>Future#get() get()</c> method will never return normally,
and will throw an exception upon task cancellation or
abnormal termination of a task execution.</returns>
<remarks>
<para>Submits a periodic action that becomes enabled first after the
given initial delay, and subsequently with the given period;
that is, executions will commence after
<c>initialDelay</c>, then <c>initialDelay + period</c>, then
<c>initialDelay + 2 * period</c>, and so on.</para>
<para>The sequence of task executions continues indefinitely until
one of the following exceptional completions occur:
<ul>
<li>The task is Future#cancel explicitly cancelled
via the returned future.
<li>The executor terminates, also resulting in task cancellation.
<li>An execution of the task throws an exception. In this case
calling <c>Future#get() get</c> on the returned future will throw
<c>ExecutionException</c>, holding the exception as its cause.
</ul>
Subsequent executions are suppressed. Subsequent calls to
<c>Future#isDone isDone()</c> on the returned future will
return <c>true</c>.</para>
<para>If any execution of this task takes longer than its period, then
subsequent executions may start late, but will not concurrently
execute.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/concurrent/ScheduledExecutorService#scheduleAtFixedRate(java.lang.Runnable,%20long,%20long,%20java.util.concurrent.TimeUnit)" title="Reference documentation">Java documentation for <code>java.util.concurrent.ScheduledExecutorService.scheduleAtFixedRate(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
<exception cref="T:Java.Util.Concurrent.RejectedExecutionException">if the task cannot be
scheduled for execution</exception>
<exception cref="T:Java.Lang.NullPointerException">if command is null</exception>
<exception cref="T:Java.Lang.IllegalArgumentException">if period less than or equal to zero
</exception>
</Docs>
</Member>
<Member MemberName="ScheduleWithFixedDelay">
<MemberSignature Language="C#" Value="public Java.Util.Concurrent.IScheduledFuture? ScheduleWithFixedDelay (Java.Lang.IRunnable? command, long initialDelay, long delay, Java.Util.Concurrent.TimeUnit? unit);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Java.Util.Concurrent.IScheduledFuture ScheduleWithFixedDelay(class Java.Lang.IRunnable command, int64 initialDelay, int64 delay, class Java.Util.Concurrent.TimeUnit unit) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.Concurrent.IScheduledExecutorService.ScheduleWithFixedDelay(Java.Lang.IRunnable,System.Int64,System.Int64,Java.Util.Concurrent.TimeUnit)" />
<MemberSignature Language="F#" Value="abstract member ScheduleWithFixedDelay : Java.Lang.IRunnable * int64 * int64 * Java.Util.Concurrent.TimeUnit -> Java.Util.Concurrent.IScheduledFuture" Usage="iScheduledExecutorService.ScheduleWithFixedDelay (command, initialDelay, delay, unit)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("scheduleWithFixedDelay", "(Ljava/lang/Runnable;JJLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;", "GetScheduleWithFixedDelay_Ljava_lang_Runnable_JJLjava_util_concurrent_TimeUnit_Handler:Java.Util.Concurrent.IScheduledExecutorServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("scheduleWithFixedDelay", "(Ljava/lang/Runnable;JJLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;", "GetScheduleWithFixedDelay_Ljava_lang_Runnable_JJLjava_util_concurrent_TimeUnit_Handler:Java.Util.Concurrent.IScheduledExecutorServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Util.Concurrent.IScheduledFuture</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="command" Type="Java.Lang.IRunnable" />
<Parameter Name="initialDelay" Type="System.Int64" />
<Parameter Name="delay" Type="System.Int64" />
<Parameter Name="unit" Type="Java.Util.Concurrent.TimeUnit" />
</Parameters>
<Docs>
<param name="command">the task to execute</param>
<param name="initialDelay">the time to delay first execution</param>
<param name="delay">the delay between the termination of one
execution and the commencement of the next</param>
<param name="unit">the time unit of the initialDelay and delay parameters</param>
<summary>Submits a periodic action that becomes enabled first after the
given initial delay, and subsequently with the given delay
between the termination of one execution and the commencement of
the next.</summary>
<returns>a ScheduledFuture representing pending completion of
the series of repeated tasks. The future's <c>Future#get() get()</c> method will never return normally,
and will throw an exception upon task cancellation or
abnormal termination of a task execution.</returns>
<remarks>
<para>Submits a periodic action that becomes enabled first after the
given initial delay, and subsequently with the given delay
between the termination of one execution and the commencement of
the next.</para>
<para>The sequence of task executions continues indefinitely until
one of the following exceptional completions occur:
<ul>
<li>The task is Future#cancel explicitly cancelled
via the returned future.
<li>The executor terminates, also resulting in task cancellation.
<li>An execution of the task throws an exception. In this case
calling <c>Future#get() get</c> on the returned future will throw
<c>ExecutionException</c>, holding the exception as its cause.
</ul>
Subsequent executions are suppressed. Subsequent calls to
<c>Future#isDone isDone()</c> on the returned future will
return <c>true</c>.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/concurrent/ScheduledExecutorService#scheduleWithFixedDelay(java.lang.Runnable,%20long,%20long,%20java.util.concurrent.TimeUnit)" title="Reference documentation">Java documentation for <code>java.util.concurrent.ScheduledExecutorService.scheduleWithFixedDelay(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
<exception cref="T:Java.Util.Concurrent.RejectedExecutionException">if the task cannot be
scheduled for execution</exception>
<exception cref="T:Java.Lang.NullPointerException">if command is null</exception>
<exception cref="T:Java.Lang.IllegalArgumentException">if delay less than or equal to zero
</exception>
</Docs>
</Member>
</Members>
</Type>