StandardWatchEventKinds
Stay organized with collections
Save and categorize content based on your preferences.
Defines the standard event kinds.
Inherited Method Summary
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals( Object obj)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Invoked when the garbage collector has detected that this instance is no longer reachable.
|
final
Class<?>
|
getClass()
Returns the unique instance of Class that represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait(long timeout, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long timeout)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
Fields
public
static
final
Kind<Path>
ENTRY_CREATE
Directory entry created.
When a directory is registered for this event then the WatchKey
is queued when it is observed that an entry is created in the directory
or renamed into the directory. The event count
for this event is always 1
.
public
static
final
Kind<Path>
ENTRY_DELETE
Directory entry deleted.
When a directory is registered for this event then the WatchKey
is queued when it is observed that an entry is deleted or renamed out of
the directory. The event count
for this event
is always 1
.
public
static
final
Kind<Path>
ENTRY_MODIFY
Directory entry modified.
When a directory is registered for this event then the WatchKey
is queued when it is observed that an entry in the directory has been
modified. The event count
for this event is
1
or greater.
public
static
final
Kind<Object>
OVERFLOW
A special event to indicate that events may have been lost or
discarded.
The context
for this event is
implementation specific and may be null
. The event count
may be greater than 1
.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["\u003cp\u003e\u003ccode\u003eStandardWatchEventKinds\u003c/code\u003e defines standard event types used in file system monitoring.\u003c/p\u003e\n"],["\u003cp\u003eThe events \u003ccode\u003eENTRY_CREATE\u003c/code\u003e, \u003ccode\u003eENTRY_DELETE\u003c/code\u003e, and \u003ccode\u003eENTRY_MODIFY\u003c/code\u003e track the creation, deletion, and modification of directory entries, respectively.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eOVERFLOW\u003c/code\u003e is a special event type that indicates potential loss of file system events.\u003c/p\u003e\n"],["\u003cp\u003eEvent details like count and context are provided by \u003ccode\u003eWatchEvent\u003c/code\u003e objects.\u003c/p\u003e\n"]]],["`StandardWatchEventKinds` defines standard file system event types. Key actions include monitoring directory entry changes: `ENTRY_CREATE` (entry created), `ENTRY_DELETE` (entry deleted), and `ENTRY_MODIFY` (entry modified). Each of these events has a count of 1, with a `WatchKey` being queued. The `OVERFLOW` event indicates potential loss of events and its context may be null; its count can be greater than 1. These are the standard events for a `WatchService`.\n"],null,["# StandardWatchEventKinds\n\npublic final class **StandardWatchEventKinds** extends [Object](../../../../reference/java/lang/Object.html) \nDefines the *standard* event kinds. \n\n### Field Summary\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|\n| public static final [Kind](../../../../reference/java/nio/file/WatchEvent.Kind.html)\\\u003c[Path](../../../../reference/java/nio/file/Path.html)\\\u003e | [ENTRY_CREATE](../../../../reference/java/nio/file/StandardWatchEventKinds.html#ENTRY_CREATE) | Directory entry created. |\n| public static final [Kind](../../../../reference/java/nio/file/WatchEvent.Kind.html)\\\u003c[Path](../../../../reference/java/nio/file/Path.html)\\\u003e | [ENTRY_DELETE](../../../../reference/java/nio/file/StandardWatchEventKinds.html#ENTRY_DELETE) | Directory entry deleted. |\n| public static final [Kind](../../../../reference/java/nio/file/WatchEvent.Kind.html)\\\u003c[Path](../../../../reference/java/nio/file/Path.html)\\\u003e | [ENTRY_MODIFY](../../../../reference/java/nio/file/StandardWatchEventKinds.html#ENTRY_MODIFY) | Directory entry modified. |\n| public static final [Kind](../../../../reference/java/nio/file/WatchEvent.Kind.html)\\\u003c[Object](../../../../reference/java/lang/Object.html)\\\u003e | [OVERFLOW](../../../../reference/java/nio/file/StandardWatchEventKinds.html#OVERFLOW) | A special event to indicate that events may have been lost or discarded. |\n\n### Inherited Method Summary\n\nFrom class [java.lang.Object](../../../../reference/java/lang/Object.html) \n\n|----------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Object](../../../../reference/java/lang/Object.html) | [clone](../../../../reference/java/lang/Object.html#clone())() Creates and returns a copy of this `Object`. |\n| boolean | [equals](../../../../reference/java/lang/Object.html#equals(java.lang.Object))([Object](../../../../reference/java/lang/Object.html) obj) Compares this instance with the specified object and indicates if they are equal. |\n| void | [finalize](../../../../reference/java/lang/Object.html#finalize())() Invoked when the garbage collector has detected that this instance is no longer reachable. |\n| final [Class](../../../../reference/java/lang/Class.html)\\\u003c?\\\u003e | [getClass](../../../../reference/java/lang/Object.html#getClass())() Returns the unique instance of [Class](../../../../reference/java/lang/Class.html) that represents this object's class. |\n| int | [hashCode](../../../../reference/java/lang/Object.html#hashCode())() Returns an integer hash code for this object. |\n| final void | [notify](../../../../reference/java/lang/Object.html#notify())() Causes a thread which is waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |\n| final void | [notifyAll](../../../../reference/java/lang/Object.html#notifyAll())() Causes all threads which are waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |\n| [String](../../../../reference/java/lang/String.html) | [toString](../../../../reference/java/lang/Object.html#toString())() Returns a string containing a concise, human-readable description of this object. |\n| final void | [wait](../../../../reference/java/lang/Object.html#wait(long,%20int))(long timeout, int nanos) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |\n| final void | [wait](../../../../reference/java/lang/Object.html#wait(long))(long timeout) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |\n| final void | [wait](../../../../reference/java/lang/Object.html#wait())() Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object. |\n\nFields\n------\n\n#### public static final [Kind](../../../../reference/java/nio/file/WatchEvent.Kind.html)\\\u003c[Path](../../../../reference/java/nio/file/Path.html)\\\u003e\n**ENTRY_CREATE**\n\nDirectory entry created.\n\nWhen a directory is registered for this event then the [WatchKey](../../../../reference/java/nio/file/WatchKey.html)\nis queued when it is observed that an entry is created in the directory\nor renamed into the directory. The event [count](../../../../reference/java/nio/file/WatchEvent.html#count())\nfor this event is always `1`. \n\n#### public static final [Kind](../../../../reference/java/nio/file/WatchEvent.Kind.html)\\\u003c[Path](../../../../reference/java/nio/file/Path.html)\\\u003e\n**ENTRY_DELETE**\n\nDirectory entry deleted.\n\nWhen a directory is registered for this event then the [WatchKey](../../../../reference/java/nio/file/WatchKey.html)\nis queued when it is observed that an entry is deleted or renamed out of\nthe directory. The event [count](../../../../reference/java/nio/file/WatchEvent.html#count()) for this event\nis always `1`. \n\n#### public static final [Kind](../../../../reference/java/nio/file/WatchEvent.Kind.html)\\\u003c[Path](../../../../reference/java/nio/file/Path.html)\\\u003e\n**ENTRY_MODIFY**\n\nDirectory entry modified.\n\nWhen a directory is registered for this event then the [WatchKey](../../../../reference/java/nio/file/WatchKey.html)\nis queued when it is observed that an entry in the directory has been\nmodified. The event [count](../../../../reference/java/nio/file/WatchEvent.html#count()) for this event is\n`1` or greater. \n\n#### public static final [Kind](../../../../reference/java/nio/file/WatchEvent.Kind.html)\\\u003c[Object](../../../../reference/java/lang/Object.html)\\\u003e\n**OVERFLOW**\n\nA special event to indicate that events may have been lost or\ndiscarded.\n\nThe [context](../../../../reference/java/nio/file/WatchEvent.html#context()) for this event is\nimplementation specific and may be `null`. The event [count](../../../../reference/java/nio/file/WatchEvent.html#count()) may be greater than `1`. \n\n##### See Also\n\n- [WatchService](../../../../reference/java/nio/file/WatchService.html)"]]