public class Nio2ModificationWatcher extends ModificationWatcher
ModificationWatcher.Entry| Constructor and Description |
|---|
Nio2ModificationWatcher(Application application,
Duration pollFrequency)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkCreated(org.slf4j.Logger log)
Checks for newly created files and folders.
|
void |
destroy() |
protected void |
entryCreated(Path path,
org.slf4j.Logger log)
A callback method called when a new Path entry is created
|
protected void |
entryDeleted(Path path,
org.slf4j.Logger log)
A callback method called when a new Path entry is deleted
|
protected void |
entryModified(Path path,
org.slf4j.Logger log)
A callback method called when a new Path entry is modified
|
protected WatchEvent.Kind[] |
getWatchedKinds(Path folder) |
void |
start(Duration pollFrequency) |
add, checkModified, getEntries, removepublic Nio2ModificationWatcher(Application application, Duration pollFrequency)
application - The application that manages the cachespollFrequency - How often to check on IModifiablespublic void start(Duration pollFrequency)
start in interface IModificationWatcherstart in class ModificationWatcherprotected void checkCreated(org.slf4j.Logger log)
Markup.NO_MARKUP (Not Found) entries for them already.log - a logger that can be used to log the eventsprotected void entryModified(Path path, org.slf4j.Logger log)
path - the modified pathlog - a logger that can be used to log the eventsprotected void entryDeleted(Path path, org.slf4j.Logger log)
path - the deleted pathlog - a logger that can be used to log the eventsprotected void entryCreated(Path path, org.slf4j.Logger log)
path - the new path entrylog - a logger that can be used to log the eventspublic void destroy()
destroy in interface IModificationWatcherdestroy in class ModificationWatcherprotected WatchEvent.Kind[] getWatchedKinds(Path folder)
folder - the folder that will be watchedCopyright © 2006–2021 Apache Software Foundation. All rights reserved.