A B C D E G H I J M N O P R S T V W 
All Classes All Packages

A

accept(EventHandlingWatch, WatchEvent) - Method in class engineering.swat.watch.impl.overflows.IndexingRescanner
 
accept(EventHandlingWatch, WatchEvent) - Method in class engineering.swat.watch.impl.overflows.MemorylessRescanner
 
ActiveWatch - Interface in engineering.swat.watch
Marker interface for an active watch, in the future might get more properties you can inspect.
ALL - engineering.swat.watch.Approximation
Synthetic events of kinds WatchEvent.Kind.CREATED and WatchEvent.Kind.MODIFIED, but not WatchEvent.Kind.DELETED, are issued for all regular files/directories in the scope of the watch.
Approximation - Enum in engineering.swat.watch
Constants to indicate for which regular files/directories in the scope of the watch an approximation of synthetic events (of kinds WatchEvent.Kind.CREATED, WatchEvent.Kind.MODIFIED, and/or WatchEvent.Kind.DELETED) should be issued when an overflow event happens.
areEquivalent(WatchEvent, WatchEvent) - Static method in class engineering.swat.watch.WatchEvent
Tests the equivalence of two events.

B

BaseFileVisitor - Class in engineering.swat.watch.impl.overflows
Base extension of SimpleFileVisitor, intended to be further specialized by subclasses to auto-handle WatchEvent.Kind.OVERFLOW events.
BaseFileVisitor(Path, WatchScope) - Constructor for class engineering.swat.watch.impl.overflows.BaseFileVisitor
 
BundledSubscription<Key extends @NonNull Object,​Event extends @NonNull Object> - Class in engineering.swat.watch.impl.util
This is an internal class where we can join multiple subscriptions to the same target by only taking 1 actual subscription but forwarding them to all the interested parties.
BundledSubscription(ISubscribable<Key, Event>) - Constructor for class engineering.swat.watch.impl.util.BundledSubscription
 

C

calculateFullPath() - Method in class engineering.swat.watch.WatchEvent
 
close() - Method in class engineering.swat.watch.impl.jdk.JDKDirectoryWatch
 
close() - Method in class engineering.swat.watch.impl.jdk.JDKFileTreeWatch
 
close() - Method in class engineering.swat.watch.impl.jdk.JDKFileWatch
 
CREATED - engineering.swat.watch.WatchEvent.Kind
A path entry was created.

D

DELETED - engineering.swat.watch.WatchEvent.Kind
The path entry was deleted.
DIFF - engineering.swat.watch.Approximation
Synthetic events of kinds WatchEvent.Kind.CREATED, WatchEvent.Kind.MODIFIED, and WatchEvent.Kind.DELETED are issued for regular files/directories in the scope of the watch, when their current versions are different from their previous versions, as determined using last-modified-times.

E

engineering.swat.watch - package engineering.swat.watch
 
engineering.swat.watch.impl - package engineering.swat.watch.impl
 
engineering.swat.watch.impl.jdk - package engineering.swat.watch.impl.jdk
 
engineering.swat.watch.impl.overflows - package engineering.swat.watch.impl.overflows
 
engineering.swat.watch.impl.util - package engineering.swat.watch.impl.util
 
equals(Object) - Method in class engineering.swat.watch.impl.util.SubscriptionKey
 
eventFilter - Variable in class engineering.swat.watch.impl.jdk.JDKBaseWatch
 
eventHandler - Variable in class engineering.swat.watch.impl.jdk.JDKBaseWatch
 
EventHandlingWatch - Interface in engineering.swat.watch.impl
 
events - Variable in class engineering.swat.watch.impl.overflows.MemorylessRescanner.Generator
 
eventStream() - Method in class engineering.swat.watch.impl.overflows.MemorylessRescanner.Generator
 
exec - Variable in class engineering.swat.watch.impl.jdk.JDKBaseWatch
 

G

generateEvents(Path, BasicFileAttributes) - Method in class engineering.swat.watch.impl.overflows.IndexingRescanner.Generator
 
generateEvents(Path, BasicFileAttributes) - Method in class engineering.swat.watch.impl.overflows.MemorylessRescanner.Generator
 
Generator(Path, WatchScope) - Constructor for class engineering.swat.watch.impl.overflows.IndexingRescanner.Generator
 
Generator(Path, WatchScope) - Constructor for class engineering.swat.watch.impl.overflows.MemorylessRescanner.Generator
 
getFileName() - Method in class engineering.swat.watch.WatchEvent
 
getKind() - Method in class engineering.swat.watch.WatchEvent
 
getPath() - Method in interface engineering.swat.watch.ActiveWatch
Gets the path watched by this watch.
getPath() - Method in class engineering.swat.watch.impl.jdk.JDKBaseWatch
 
getPath() - Method in class engineering.swat.watch.impl.util.SubscriptionKey
 
getRelativePath() - Method in class engineering.swat.watch.WatchEvent
 
getRootPath() - Method in class engineering.swat.watch.WatchEvent
 
getScope() - Method in interface engineering.swat.watch.ActiveWatch
Gets the scope of this watch.
getScope() - Method in class engineering.swat.watch.impl.jdk.JDKDirectoryWatch
 
getScope() - Method in class engineering.swat.watch.impl.jdk.JDKFileTreeWatch
 
getScope() - Method in class engineering.swat.watch.impl.jdk.JDKFileWatch
 

H

handleEvent(WatchEvent) - Method in interface engineering.swat.watch.impl.EventHandlingWatch
Handles `event`.
handleEvent(WatchEvent) - Method in class engineering.swat.watch.impl.jdk.JDKBaseWatch
 
handleEvent(WatchEvent) - Method in class engineering.swat.watch.impl.jdk.JDKDirectoryWatch
 
handleEvent(WatchEvent) - Method in class engineering.swat.watch.impl.jdk.JDKFileTreeWatch
 
handleEvent(WatchEvent) - Method in class engineering.swat.watch.impl.jdk.JDKFileWatch
 
hashCode() - Method in class engineering.swat.watch.impl.util.SubscriptionKey
 

I

IndexingRescanner - Class in engineering.swat.watch.impl.overflows
 
IndexingRescanner(Executor, Path, WatchScope) - Constructor for class engineering.swat.watch.impl.overflows.IndexingRescanner
 
IndexingRescanner.Generator - Class in engineering.swat.watch.impl.overflows
 
isClosed() - Method in class engineering.swat.watch.impl.jdk.JDKDirectoryWatch
 
isRecursive() - Method in class engineering.swat.watch.impl.util.SubscriptionKey
 
ISubscribable<Key,​Event> - Interface in engineering.swat.watch.impl.util
 

J

JDKBaseWatch - Class in engineering.swat.watch.impl.jdk
 
JDKBaseWatch(Path, Executor, BiConsumer<EventHandlingWatch, WatchEvent>, Predicate<WatchEvent>) - Constructor for class engineering.swat.watch.impl.jdk.JDKBaseWatch
 
JDKDirectoryWatch - Class in engineering.swat.watch.impl.jdk
 
JDKDirectoryWatch(Path, Executor, BiConsumer<EventHandlingWatch, WatchEvent>, Predicate<WatchEvent>) - Constructor for class engineering.swat.watch.impl.jdk.JDKDirectoryWatch
 
JDKDirectoryWatch(Path, Executor, BiConsumer<EventHandlingWatch, WatchEvent>, Predicate<WatchEvent>, boolean) - Constructor for class engineering.swat.watch.impl.jdk.JDKDirectoryWatch
 
JDKFileTreeWatch - Class in engineering.swat.watch.impl.jdk
 
JDKFileTreeWatch(Path, Path, Executor, BiConsumer<EventHandlingWatch, WatchEvent>, Predicate<WatchEvent>) - Constructor for class engineering.swat.watch.impl.jdk.JDKFileTreeWatch
 
JDKFileTreeWatch(Path, Executor, BiConsumer<EventHandlingWatch, WatchEvent>, Predicate<WatchEvent>) - Constructor for class engineering.swat.watch.impl.jdk.JDKFileTreeWatch
 
JDKFileWatch - Class in engineering.swat.watch.impl.jdk
It's not possible to monitor a single file (or directory), so we have to find a directory watcher, and connect to that Note that you should take care to call start only once.
JDKFileWatch(Path, Executor, BiConsumer<EventHandlingWatch, WatchEvent>, Predicate<WatchEvent>) - Constructor for class engineering.swat.watch.impl.jdk.JDKFileWatch
 

M

MemorylessRescanner - Class in engineering.swat.watch.impl.overflows
 
MemorylessRescanner(Executor) - Constructor for class engineering.swat.watch.impl.overflows.MemorylessRescanner
 
MemorylessRescanner.Generator - Class in engineering.swat.watch.impl.overflows
 
MODIFIED - engineering.swat.watch.WatchEvent.Kind
The path entry was saved.

N

newGenerator(Path, WatchScope) - Method in class engineering.swat.watch.impl.overflows.IndexingRescanner
 
newGenerator(Path, WatchScope) - Method in class engineering.swat.watch.impl.overflows.MemorylessRescanner
 
NONE - engineering.swat.watch.Approximation
Synthetic events are issued for no regular files/directories in the scope of the watch.

O

on(WatchEventListener) - Method in class engineering.swat.watch.Watcher
Convenience variant of Watcher.on(Consumer), which allows you to only respond to certain events
on(Consumer<WatchEvent>) - Method in class engineering.swat.watch.Watcher
Callback that gets executed for every event.
onCreated(WatchEvent) - Method in interface engineering.swat.watch.WatchEventListener
 
onDeleted(WatchEvent) - Method in interface engineering.swat.watch.WatchEventListener
 
onModified(WatchEvent) - Method in interface engineering.swat.watch.WatchEventListener
 
onOverflow(Approximation) - Method in class engineering.swat.watch.Watcher
Optionally configure which regular files/directories in the scope of the watch an approximation of synthetic events (of kinds WatchEvent.Kind.CREATED, WatchEvent.Kind.MODIFIED, and/or WatchEvent.Kind.DELETED) should be issued when an overflow event happens.
onOverflow(WatchEvent) - Method in interface engineering.swat.watch.WatchEventListener
 
open() - Method in class engineering.swat.watch.impl.jdk.JDKBaseWatch
 
OVERFLOW - engineering.swat.watch.WatchEvent.Kind
Rare event where there were so many file events, that the kernel lost a few.

P

path - Variable in class engineering.swat.watch.impl.jdk.JDKBaseWatch
 
path - Variable in class engineering.swat.watch.impl.overflows.BaseFileVisitor
 
PATH_AND_ALL_DESCENDANTS - engineering.swat.watch.WatchScope
Watch changes to (metadata of) a directory and its content, recursively.
PATH_AND_CHILDREN - engineering.swat.watch.WatchScope
Watch changes to (metadata of) a directory and its content, non-recursively.
PATH_ONLY - engineering.swat.watch.WatchScope
Watch changes to a single file or (metadata of) a single directory.
postVisitDirectory(Path, IOException) - Method in class engineering.swat.watch.impl.overflows.BaseFileVisitor
 
postVisitDirectory(Path, IOException) - Method in class engineering.swat.watch.impl.overflows.IndexingRescanner.Generator
 
preVisitDirectory(Path, BasicFileAttributes) - Method in class engineering.swat.watch.impl.overflows.IndexingRescanner.Generator
 
preVisitDirectory(Path, BasicFileAttributes) - Method in class engineering.swat.watch.impl.overflows.MemorylessRescanner.Generator
 

R

relativize(WatchEvent) - Method in interface engineering.swat.watch.impl.EventHandlingWatch
Relativizes the full path of `event` against the path watched by this watch (as per `getPath()`).
rescan(EventHandlingWatch) - Method in class engineering.swat.watch.impl.overflows.MemorylessRescanner
Rescan all files in the scope of `watch` and issue `CREATED` and `MODIFIED` events (not `DELETED` events) for each file.

S

scope - Variable in class engineering.swat.watch.impl.overflows.BaseFileVisitor
 
start() - Method in class engineering.swat.watch.impl.jdk.JDKBaseWatch
Starts this watch.
start() - Method in class engineering.swat.watch.impl.jdk.JDKDirectoryWatch
 
start() - Method in class engineering.swat.watch.impl.jdk.JDKFileTreeWatch
 
start() - Method in class engineering.swat.watch.impl.jdk.JDKFileWatch
 
start() - Method in class engineering.swat.watch.Watcher
Start watch the path for events.
started - Variable in class engineering.swat.watch.impl.jdk.JDKBaseWatch
 
startIfFirstTime() - Method in class engineering.swat.watch.impl.jdk.JDKBaseWatch
Starts this watch if it's the first time.
subscribe(Key, Consumer<Event>) - Method in class engineering.swat.watch.impl.util.BundledSubscription
 
subscribe(Key, Consumer<Event>) - Method in interface engineering.swat.watch.impl.util.ISubscribable
 
SubscriptionKey - Class in engineering.swat.watch.impl.util
 
SubscriptionKey(Path, boolean) - Constructor for class engineering.swat.watch.impl.util.SubscriptionKey
 

T

toString() - Method in class engineering.swat.watch.impl.util.SubscriptionKey
 
toString() - Method in class engineering.swat.watch.WatchEvent
 
translate(WatchEvent.Kind<?>) - Method in class engineering.swat.watch.impl.jdk.JDKBaseWatch
 
translate(WatchEvent<?>) - Method in class engineering.swat.watch.impl.jdk.JDKBaseWatch
 

V

valueOf(String) - Static method in enum engineering.swat.watch.Approximation
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum engineering.swat.watch.WatchEvent.Kind
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum engineering.swat.watch.WatchScope
Returns the enum constant of this type with the specified name.
values() - Static method in enum engineering.swat.watch.Approximation
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum engineering.swat.watch.WatchEvent.Kind
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum engineering.swat.watch.WatchScope
Returns an array containing the constants of this enum type, in the order they are declared.
visitFile(Path, BasicFileAttributes) - Method in class engineering.swat.watch.impl.overflows.IndexingRescanner.Generator
 
visitFile(Path, BasicFileAttributes) - Method in class engineering.swat.watch.impl.overflows.MemorylessRescanner.Generator
 
visitFileFailed(Path, IOException) - Method in class engineering.swat.watch.impl.overflows.BaseFileVisitor
 

W

walkFileTree() - Method in class engineering.swat.watch.impl.overflows.BaseFileVisitor
 
watch(Path, WatchScope) - Static method in class engineering.swat.watch.Watcher
Watch a path for updates, optionally also get events for its children/descendants
Watcher - Class in engineering.swat.watch
Watch a path for changes.
WatchEvent - Class in engineering.swat.watch
The library publishes these events to all subscribers, they are immutable and safe to share around.
WatchEvent(WatchEvent.Kind, Path) - Constructor for class engineering.swat.watch.WatchEvent
 
WatchEvent(WatchEvent.Kind, Path, Path) - Constructor for class engineering.swat.watch.WatchEvent
 
WatchEvent.Kind - Enum in engineering.swat.watch
What happened with the file or directory
WatchEventListener - Interface in engineering.swat.watch
A visit like interface that allows you to only override the functions you are interested in
WatchScope - Enum in engineering.swat.watch
Configure the depth of the events you want to receive for a given path
withExecutor(Executor) - Method in class engineering.swat.watch.Watcher
Optionally configure the executor in which the Watcher.on(Consumer) callbacks are scheduled.
A B C D E G H I J M N O P R S T V W 
All Classes All Packages