Interface MacOSXListeningWatchService.Config

Enclosing class:
MacOSXListeningWatchService

public static interface MacOSXListeningWatchService.Config
Configuration for the watch service.
  • Field Summary

    Fields
    Modifier and Type Field Description
    static double DEFAULT_LATENCY  
    static int DEFAULT_QUEUE_SIZE  
  • Method Summary

    Modifier and Type Method Description
    default FileHasher fileHasher()
    The file hasher to use to check whether files have changed.
    default boolean fileLevelEvents()
    Request file-level notifications from the watcher.
    default double latency()
    The maximum number of seconds to wait after hearing about an event
    default int queueSize()
    The size of the queue used for each WatchKey
  • Field Details

  • Method Details

    • latency

      default double latency()
      The maximum number of seconds to wait after hearing about an event
    • queueSize

      default int queueSize()
      The size of the queue used for each WatchKey
    • fileLevelEvents

      default boolean fileLevelEvents()
      Request file-level notifications from the watcher. This can be expensive so use with care.

      NOTE: this feature will automatically be enabled when the file hasher is null, since the hasher is needed to determine which files in a directory were actually created or modified.

    • fileHasher

      default FileHasher fileHasher()
      The file hasher to use to check whether files have changed. If null, this will disable file hashing and automatically turn on file-level events. See `fileLevelEvents` config for more information.