public static class PathWatcher.PathWatchEvent extends Object
| Constructor and Description |
|---|
PathWatchEvent(Path path,
PathWatcher.PathWatchEventType type) |
PathWatchEvent(Path path,
WatchEvent<Path> event) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
getCount() |
Path |
getPath() |
long |
getTimestamp() |
PathWatcher.PathWatchEventType |
getType() |
int |
hashCode() |
void |
incrementCount(int num) |
boolean |
isQuiet(long expiredDuration,
TimeUnit expiredUnit)
Check to see if the file referenced by this Event is quiet.
|
String |
toString() |
public PathWatchEvent(Path path, PathWatcher.PathWatchEventType type)
public PathWatchEvent(Path path, WatchEvent<Path> event)
public boolean isQuiet(long expiredDuration,
TimeUnit expiredUnit)
Will validate the timestamp to see if it is expired, as well as if the file size hasn't changed within the quiet period.
Always updates timestamp to 'now' on use of this method.
expiredDuration - the expired duration past the timestamp to be considered expiredexpiredUnit - the unit of time for the expired checkpublic int getCount()
public Path getPath()
public long getTimestamp()
public PathWatcher.PathWatchEventType getType()
public void incrementCount(int num)
Copyright © 1995-2015 Webtide. All Rights Reserved.