Dela via


IWatchService.Poll Method

Definition

Overloads

Poll()

Retrieves and removes the next watch key, or null if none are present.

Poll(Int64, TimeUnit)

Retrieves and removes the next watch key, waiting if necessary up to the specified wait time if none are yet present.

Poll()

Retrieves and removes the next watch key, or null if none are present.

[Android.Runtime.Register("poll", "()Ljava/nio/file/WatchKey;", "GetPollHandler:Java.Nio.FileNio.IWatchServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public Java.Nio.FileNio.IWatchKey? Poll ();
[<Android.Runtime.Register("poll", "()Ljava/nio/file/WatchKey;", "GetPollHandler:Java.Nio.FileNio.IWatchServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member Poll : unit -> Java.Nio.FileNio.IWatchKey

Returns

the next watch key, or null

Attributes

Remarks

Retrieves and removes the next watch key, or null if none are present.

Java documentation for java.nio.file.WatchService.poll().

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

Poll(Int64, TimeUnit)

Retrieves and removes the next watch key, waiting if necessary up to the specified wait time if none are yet present.

[Android.Runtime.Register("poll", "(JLjava/util/concurrent/TimeUnit;)Ljava/nio/file/WatchKey;", "GetPoll_JLjava_util_concurrent_TimeUnit_Handler:Java.Nio.FileNio.IWatchServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public Java.Nio.FileNio.IWatchKey? Poll (long timeout, Java.Util.Concurrent.TimeUnit? unit);
[<Android.Runtime.Register("poll", "(JLjava/util/concurrent/TimeUnit;)Ljava/nio/file/WatchKey;", "GetPoll_JLjava_util_concurrent_TimeUnit_Handler:Java.Nio.FileNio.IWatchServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member Poll : int64 * Java.Util.Concurrent.TimeUnit -> Java.Nio.FileNio.IWatchKey

Parameters

timeout
Int64

how to wait before giving up, in units of unit

unit
TimeUnit

a TimeUnit determining how to interpret the timeout parameter

Returns

the next watch key, or null

Attributes

Remarks

Retrieves and removes the next watch key, waiting if necessary up to the specified wait time if none are yet present.

Java documentation for java.nio.file.WatchService.poll(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