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.
- Alphabetic
- By Inheritance
- SymlinkWatcher
- AutoCloseable
- Observable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new SymlinkWatcher(watcher: PathWatcher[Event])
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
addObserver(observer: Observer[_ >: Event]): Int
Add an observer of events.
Add an observer of events.
- observer
the observer to add
- returns
the handle to the observer.
- Definition Classes
- SymlinkWatcher → Observable
-
def
addSymlink(path: Path, maxDepth: Int): Unit
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.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
close(): Unit
- Definition Classes
- SymlinkWatcher → AutoCloseable
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val reentrantLock: ReentrantLock
-
def
remove(path: Path): Unit
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
-
def
removeObserver(handle: Int): Unit
Remove an observer.
Remove an observer.
- handle
the handle that was returned by addObserver
- Definition Classes
- SymlinkWatcher → Observable
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )