Stay organized with collections
Save and categorize content based on your preferences.
StandardWatchEventKinds
public
final
class
StandardWatchEventKinds
extends Object
Defines the standard event kinds.
Summary
Inherited methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted.
|
|
Fields
ENTRY_CREATE
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
.
ENTRY_DELETE
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
.
ENTRY_MODIFY
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.
OVERFLOW
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
.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# StandardWatchEventKinds\n\nAdded in [API level 26](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Fields](#lfields) \\| [Inherited Methods](#inhmethods) \n\nStandardWatchEventKinds\n=======================\n\n\n`\npublic\n\nfinal\n\nclass\nStandardWatchEventKinds\n`\n\n\n`\n\nextends `[Object](/reference/java/lang/Object)`\n\n\n`\n\n`\n\n\n`\n\n|---|---------------------------------------|\n| [java.lang.Object](/reference/java/lang/Object) ||\n| ↳ | java.nio.file.StandardWatchEventKinds |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nDefines the *standard* event kinds.\n\nSummary\n-------\n\n| ### Fields ||\n|--------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` public static final `[Kind](/reference/java/nio/file/WatchEvent.Kind)`\u003c`[Path](/reference/java/nio/file/Path)`\u003e` | [ENTRY_CREATE](/reference/java/nio/file/StandardWatchEventKinds#ENTRY_CREATE) Directory entry created. |\n| ` public static final `[Kind](/reference/java/nio/file/WatchEvent.Kind)`\u003c`[Path](/reference/java/nio/file/Path)`\u003e` | [ENTRY_DELETE](/reference/java/nio/file/StandardWatchEventKinds#ENTRY_DELETE) Directory entry deleted. |\n| ` public static final `[Kind](/reference/java/nio/file/WatchEvent.Kind)`\u003c`[Path](/reference/java/nio/file/Path)`\u003e` | [ENTRY_MODIFY](/reference/java/nio/file/StandardWatchEventKinds#ENTRY_MODIFY) Directory entry modified. |\n| ` public static final `[Kind](/reference/java/nio/file/WatchEvent.Kind)`\u003c`[Object](/reference/java/lang/Object)`\u003e` | [OVERFLOW](/reference/java/nio/file/StandardWatchEventKinds#OVERFLOW) A special event to indicate that events may have been lost or discarded. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](/reference/java/lang/Object)` ` |---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](/reference/java/lang/Object) | ` `[clone](/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object. | | ` boolean` | ` `[equals](/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](/reference/java/lang/Object)` obj) ` Indicates whether some other object is \"equal to\" this one. | | ` void` | ` `[finalize](/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final `[Class](/reference/java/lang/Class)`\u003c?\u003e` | ` `[getClass](/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`. | | ` int` | ` `[hashCode](/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object. | | ` final void` | ` `[notify](/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` `[notifyAll](/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor. | | ` `[String](/reference/java/lang/String) | ` `[toString](/reference/java/lang/Object#toString())`() ` Returns a string representation of the object. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||\n\nFields\n------\n\n### ENTRY_CREATE\n\nAdded in [API level 26](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final Kind\u003cPath\u003e ENTRY_CREATE\n```\n\nDirectory entry created.\n\nWhen a directory is registered for this event then the [WatchKey](/reference/java/nio/file/WatchKey)\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#count())\nfor this event is always `1`.\n\n\u003cbr /\u003e\n\n### ENTRY_DELETE\n\nAdded in [API level 26](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final Kind\u003cPath\u003e ENTRY_DELETE\n```\n\nDirectory entry deleted.\n\nWhen a directory is registered for this event then the [WatchKey](/reference/java/nio/file/WatchKey)\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#count()) for this event\nis always `1`.\n\n\u003cbr /\u003e\n\n### ENTRY_MODIFY\n\nAdded in [API level 26](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final Kind\u003cPath\u003e ENTRY_MODIFY\n```\n\nDirectory entry modified.\n\nWhen a directory is registered for this event then the [WatchKey](/reference/java/nio/file/WatchKey)\nis queued when it is observed that an entry in the directory has been\nmodified. The event [count](/reference/java/nio/file/WatchEvent#count()) for this event is\n`1` or greater.\n\n\u003cbr /\u003e\n\n### OVERFLOW\n\nAdded in [API level 26](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final Kind\u003cObject\u003e OVERFLOW\n```\n\nA special event to indicate that events may have been lost or\ndiscarded.\n\nThe [context](/reference/java/nio/file/WatchEvent#context()) for this event is\nimplementation specific and may be `null`. The event [count](/reference/java/nio/file/WatchEvent#count()) may be greater than `1`.\n\n\u003cbr /\u003e\n\n**See also:**\n\n- [WatchService](/reference/java/nio/file/WatchService)"]]