Class FileWatcherService.FileWatchEvent

java.lang.Object
host.anzo.core.service.FileWatcherService.FileWatchEvent
Enclosing class:
FileWatcherService

public static class FileWatcherService.FileWatchEvent extends Object
Represents a file system change event. Provides factory methods for creating common event types.
  • Method Details

    • created

      @Contract(value="_ -> new", pure=true) @NotNull public static FileWatcherService.FileWatchEvent created(Path path)
      Creates a CREATED event for a file at the specified path.
      Parameters:
      path - The path of the created file
      Returns:
      A new FileWatchEvent with Type.CREATED
    • deleted

      @Contract(value="_ -> new", pure=true) @NotNull public static FileWatcherService.FileWatchEvent deleted(Path path)
      Creates a DELETED event for a file at the specified path.
      Parameters:
      path - The path of the deleted file
      Returns:
      A new FileWatchEvent with Type.DELETED
    • modified

      @Contract(value="_ -> new", pure=true) @NotNull public static FileWatcherService.FileWatchEvent modified(Path path)
      Creates a MODIFIED event for a file at the specified path.
      Parameters:
      path - The path of the modified file
      Returns:
      A new FileWatchEvent with Type.MODIFIED
    • error

      @Contract(value="_ -> new", pure=true) @NotNull public static FileWatcherService.FileWatchEvent error(Exception e)
      Creates an ERROR event containing the exception that occurred.
      Parameters:
      e - The exception that caused the error
      Returns:
      A new FileWatchEvent with Type.ERROR
    • overflow

      @Contract(value=" -> new", pure=true) @NotNull public static FileWatcherService.FileWatchEvent overflow()
      Creates an OVERFLOW event indicating that events were lost or discarded.
      Returns:
      A new FileWatchEvent with Type.OVERFLOW