| Modifier and Type | Field and Description |
|---|---|
| private final WatchKey | |
| private volatile boolean | |
| private final Object | |
| private final LinkedBlockingDeque |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| public final void | |
| pack-priv final Object | |
| pack-priv final void | |
| pack-priv abstract void | |
| pack-priv final boolean | |
| public final WatchKey | poll()
Implements java. Retrieves and removes the next watch key, or |
| public final WatchKey | poll(long timeout, TimeUnit unit)
Implements java. Retrieves and removes the next watch key, waiting if necessary up to the specified wait time if none are yet present. |
| pack-priv abstract WatchKey | register(Path path, WatchEvent.
Register the given object with this watch service |
| public final WatchKey | take()
Implements java. Retrieves and removes next watch key, waiting if none are yet present. |
| CLOSE_KEY | back to summary |
|---|---|
| private final WatchKey CLOSE_KEY | |
| closed | back to summary |
|---|---|
| private volatile boolean closed | |
| closeLock | back to summary |
|---|---|
| private final Object closeLock | |
| pendingKeys | back to summary |
|---|---|
| private final LinkedBlockingDeque<WatchKey> pendingKeys | |
| AbstractWatchService | back to summary |
|---|---|
| protected AbstractWatchService() | |
| checkKey | back to summary |
|---|---|
| private void checkKey(WatchKey key) Checks the key isn't the special CLOSE_KEY used to unblock threads when the watch service is closed. | |
| checkOpen | back to summary |
|---|---|
| private void checkOpen() Throws ClosedWatchServiceException if watch service is closed | |
| close | back to summary |
|---|---|
| public final void close() throws IOException Implements java. Doc from java. Closes this watch service. If a thread is currently blocked in the After a watch service is closed, any further attempt to invoke
operations upon it will throw
| |
| closeLock | back to summary |
|---|---|
| pack-priv final Object closeLock() Retrieves the object upon which the close method synchronizes. | |
| enqueueKey | back to summary |
|---|---|
| pack-priv final void enqueueKey(WatchKey key) | |
| implClose | back to summary |
|---|---|
| pack-priv abstract void implClose() throws IOException Closes this watch service. This method is invoked by the close method to perform the actual work of closing the watch service. | |
| isOpen | back to summary |
|---|---|
| pack-priv final boolean isOpen() Tells whether or not this watch service is open. | |
| poll | back to summary |
|---|---|
| public final WatchKey poll() Implements java. Doc from java. Retrieves and removes the next watch key, or
| |
| poll | back to summary |
|---|---|
| public final WatchKey poll(long timeout, TimeUnit unit) throws InterruptedException Implements java. Doc from java. Retrieves and removes the next watch key, waiting if necessary up to the specified wait time if none are yet present.
| |
| register | back to summary |
|---|---|
| pack-priv abstract WatchKey register(Path path, WatchEvent. Register the given object with this watch service | |
| take | back to summary |
|---|---|
| public final WatchKey take() throws InterruptedException Implements java. Doc from java. Retrieves and removes next watch key, waiting if none are yet present.
| |