From 24896ee3c4e9a8c953b30da775b94565e0c249f5 Mon Sep 17 00:00:00 2001 From: danielshaya Date: Mon, 27 Apr 2015 14:04:02 +0100 Subject: [PATCH] Added to JavaDoc. --- .../net/openhft/chronicle/map/FilePerKeyMap.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/openhft/chronicle/map/FilePerKeyMap.java b/src/main/java/net/openhft/chronicle/map/FilePerKeyMap.java index fcc60f61e..299995227 100644 --- a/src/main/java/net/openhft/chronicle/map/FilePerKeyMap.java +++ b/src/main/java/net/openhft/chronicle/map/FilePerKeyMap.java @@ -14,8 +14,8 @@ import java.util.stream.Stream; /** * A {@link Map} implementation that stores each entry as a file in a - * directory. The key is the file name and the value - * is the contents of the file. This map will only handle String's. + * directory. The key is the file name and the value + * is the contents of the file. This map will only handle String's. *

* The class is effectively an abstraction over a directory in the file system. * Therefore when the underlying files are changed an event will be fired to those @@ -25,6 +25,14 @@ import java.util.stream.Stream; * (i.e one caused my the actions of the map itself) and an event that * has been triggered as a direct result of a file being manipulated outside * this class. + *

+ * Updates will be fired every time the file is saved but will be suppressed + * if the value has not changed. To avoid temporary files (e.g. if edited in vi) + * being included in the map, any file starting with a '.' will be ignored. + *

+ * Note the {@link WatchService} is extremely OS dependant. Mas OSX registers + * very few events if they are done quickly and there is a significant delay + * between the event and the event being triggered. */ public class FilePerKeyMap implements Map { private final Path dirPath;