Watch Service Flashcards Preview

OCP > Watch Service > Flashcards

Flashcards in Watch Service Deck (12):
1

Gets an instance of the Watch Service

FileSystems.GetDefault()

2

Registers a path to the watch service instance.

register()

3

Watch service event that is raised when a file is modified.

ENTRY_MODIFY

4

Watch service event that is raised when a file is created.

ENTRY_CREATE

5

Watch service event that is raised when a file is deleted.

ENTRY_DELETE

6

Watch service event that is raised when too many events come in and some are missed.

OVERFLOW

7

Method that returns a queued key immediately, or null if none is available.

poll()

8

Overloaded version that returns a queued key, but waits for a specified timeout if none is available.

poll(long TimeUnit)

9

Method that blocks if no key is available.

take()

10

Method that gets the type of event from the key.

kind()

11

Method that gets the name of the file for which the event has occured.

context()

12

Method that resets the key.

reset()