Class/Object

com.swoval.files

SymlinkWatcher

Related Docs: object SymlinkWatcher | package files

Permalink

class SymlinkWatcher extends Observable[Event] with AutoCloseable

Monitors symlink targets. The SymlinkWatcher maintains a mapping of symlink targets to symlink. When the symlink target is modified, the watcher will detect the update and invoke a provided com.swoval.functional.Consumer for the symlink.

Linear Supertypes
AutoCloseable, Observable[Event], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SymlinkWatcher
  2. AutoCloseable
  3. Observable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SymlinkWatcher(watcher: PathWatcher[Event])

    Permalink
  2. new SymlinkWatcher(watcher: PathWatcher[Event], logger: Logger)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addObserver(observer: Observer[_ >: Event]): Int

    Permalink

    Add an observer of events.

    Add an observer of events.

    observer

    the observer to add

    returns

    the handle to the observer.

    Definition Classes
    SymlinkWatcherObservable
  5. def addSymlink(path: Path, maxDepth: Int): Unit

    Permalink

    Start monitoring a symlink.

    Start monitoring a symlink. As long as the target exists, this method will check if the parent directory of the target is being monitored. If the parent isn't being registered, we register it with the watch service. We add the target symlink to the set of symlinks watched in the parent directory. We also add the base symlink to the set of watched symlinks for this particular target.

    path

    The symlink base file.

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def close(): Unit

    Permalink
    Definition Classes
    SymlinkWatcher → AutoCloseable
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. val reentrantLock: ReentrantLock

    Permalink
  19. def remove(path: Path): Unit

    Permalink

    Removes the symlink from monitoring.

    Removes the symlink from monitoring. If there are no remaining targets in the parent directory, then we remove the parent directory from monitoring.

    path

    The symlink base to stop monitoring

  20. def removeObserver(handle: Int): Unit

    Permalink

    Remove an observer.

    Remove an observer.

    handle

    the handle that was returned by addObserver

    Definition Classes
    SymlinkWatcherObservable
  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  22. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AutoCloseable

Inherited from Observable[Event]

Inherited from AnyRef

Inherited from Any

Ungrouped