implicit final class WatchServiceAdapter extends WatchService with Unregisterable
Adapts a Java WatchService
to be used with sbt's WatchService
infrastructure.
- Alphabetic
- By Inheritance
- WatchServiceAdapter
- Unregisterable
- WatchService
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
WatchServiceAdapter(service: java.nio.file.WatchService)
- service
The
WatchService
to use.
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
close(): Unit
Closes this
WatchService
.Closes this
WatchService
.- Definition Classes
- WatchServiceAdapter → WatchService
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[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()
-
def
init(): Unit
Initializes the watchservice.
Initializes the watchservice.
- Definition Classes
- WatchServiceAdapter → WatchService
-
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()
-
def
poll(timeout: Duration): WatchKey
Retrieves the next
WatchKey
that has aWatchEvent
waiting.Retrieves the next
WatchKey
that has aWatchEvent
waiting. Waits until thetimeout
is expired is no such key exists.- timeout
Maximum time to wait
- returns
The next
WatchKey
that received an event, or null if no such key exists.
- Definition Classes
- WatchServiceAdapter → WatchService
- Annotations
- @tailrec()
-
def
pollEvents(): Map[WatchKey, Seq[WatchEvent[java.nio.file.Path]]]
Retrieves all the events and groups them by watch key.
Retrieves all the events and groups them by watch key. Does not wait if no event is available.
- returns
The pending events.
- Definition Classes
- WatchServiceAdapter → WatchService
-
def
register(path: java.nio.file.Path, events: Kind[java.nio.file.Path]*): WatchKey
Registers a path to be monitored.
Registers a path to be monitored.
- path
The path to monitor.
- events
The events that should be registered.
- returns
A
WatchKey
, that represents a token of registration.
- Definition Classes
- WatchServiceAdapter → WatchService
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- WatchServiceAdapter → AnyRef → Any
-
def
unregister(path: java.nio.file.Path): Unit
Unregisters a monitored path.
Unregisters a monitored path.
- path
The monitored path.
- Definition Classes
- WatchServiceAdapter → Unregisterable
-
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
- @throws( ... ) @native()