public class MacOSXListeningWatchService
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
MacOSXListeningWatchService.CFRunLoopThread |
static interface |
MacOSXListeningWatchService.Config
Configuration for the watch service.
|
| Constructor and Description |
|---|
MacOSXListeningWatchService() |
MacOSXListeningWatchService(MacOSXListeningWatchService.Config config) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelled(io.methvin.watchservice.AbstractWatchKey key)
Called when the given key is cancelled.
|
protected void |
checkOpen()
Checks that the watch service is open, throwing
ClosedWatchServiceException if not. |
void |
close() |
void |
close(MacOSXListeningWatchService.CFRunLoopThread runLoopThread,
CarbonAPI.FSEventStreamCallback callback,
java.nio.file.Path path) |
boolean |
isOpen()
Returns whether or not this watch service is open.
|
java.nio.file.WatchKey |
poll() |
java.nio.file.WatchKey |
poll(long timeout,
java.util.concurrent.TimeUnit unit) |
io.methvin.watchservice.AbstractWatchKey |
register(WatchablePath watchable,
java.lang.Iterable<? extends java.nio.file.WatchEvent.Kind<?>> events)
Registers the given watchable with this service, returning a new watch key for it.
|
java.nio.file.WatchKey |
take() |
public MacOSXListeningWatchService(MacOSXListeningWatchService.Config config)
public MacOSXListeningWatchService()
public io.methvin.watchservice.AbstractWatchKey register(WatchablePath watchable, java.lang.Iterable<? extends java.nio.file.WatchEvent.Kind<?>> events) throws java.io.IOException
java.io.IOExceptionpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface java.nio.file.WatchServicepublic void close(MacOSXListeningWatchService.CFRunLoopThread runLoopThread, CarbonAPI.FSEventStreamCallback callback, java.nio.file.Path path)
public boolean isOpen()
public void cancelled(io.methvin.watchservice.AbstractWatchKey key)
public java.nio.file.WatchKey poll()
poll in interface java.nio.file.WatchServicepublic java.nio.file.WatchKey poll(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
poll in interface java.nio.file.WatchServicejava.lang.InterruptedExceptionpublic java.nio.file.WatchKey take()
throws java.lang.InterruptedException
take in interface java.nio.file.WatchServicejava.lang.InterruptedExceptionprotected final void checkOpen()
ClosedWatchServiceException if not.