Watch Service Flashcards

1
Q

Gets an instance of the Watch Service

A

FileSystems.GetDefault()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Registers a path to the watch service instance.

A

register()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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

A

ENTRY_MODIFY

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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

A

ENTRY_CREATE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

A

ENTRY_DELETE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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

A

OVERFLOW

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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

A

poll()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

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

A

poll(long TimeUnit)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Method that blocks if no key is available.

A

take()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Method that gets the type of event from the key.

A

kind()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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

A

context()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Method that resets the key.

A

reset()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly