Skip to content

Commit 7b26f57

Browse files
committed
Update README to mention auto-handlers for overflows
1 parent 61ebbb8 commit 7b26f57

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ a java file watcher that works across platforms and supports recursion, single f
77
Features:
88

99
- monitor a single file (or directory) for changes
10-
- monitor a directory for changes to it's direct descendants
11-
- monitor a directory for changes for all it's descendants (aka recursive directory watch)
10+
- monitor a directory for changes to its direct descendants
11+
- monitor a directory for changes for all its descendants (aka recursive directory watch)
1212
- edge cases dealt with:
13-
- in case of overflow we will still generate events for new descendants
1413
- recursive watches will also continue in new directories
1514
- multiple watches for the same directory are merged to avoid overloading the kernel
1615
- events are processed in a configurable worker pool
16+
- when an overflow happens, automatically approximate the events that were
17+
missed using a configurable auto-handler
1718

1819
Planned features:
1920

@@ -39,6 +40,7 @@ Start using java-watch:
3940
var directory = Path.of("tmp", "test-dir");
4041
var watcherSetup = Watcher.watch(directory, WatchScope.PATH_AND_CHILDREN)
4142
.withExecutor(Executors.newCachedThreadPool()) // optionally configure a custom thread pool
43+
.approximate(OnOverflow.DIRTY) // optionally configure an auto-handler for overflows
4244
.on(watchEvent -> {
4345
System.err.println(watchEvent);
4446
});

0 commit comments

Comments
 (0)