IWatchService.Close 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.
Closes this watch service.
[Android.Runtime.Register("close", "()V", "GetCloseHandler:Java.Nio.FileNio.IWatchServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public void Close ();
[<Android.Runtime.Register("close", "()V", "GetCloseHandler:Java.Nio.FileNio.IWatchServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member Close : unit -> unit
Implements
- Attributes
Remarks
Closes this watch service.
If a thread is currently blocked in the #take take
or #poll(long,TimeUnit) poll
methods waiting for a key to be queued then it immediately receives a ClosedWatchServiceException
. Any valid keys associated with this watch service are WatchKey#isValid invalidated
.
After a watch service is closed, any further attempt to invoke operations upon it will throw ClosedWatchServiceException
. If this watch service is already closed then invoking this method has no effect.
Java documentation for java.nio.file.WatchService.close()
.
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.