Class

zio.nio.file

WatchKey

Related Doc: package file

Permalink

final class WatchKey extends AnyRef

A token representing the registration of a watchable object with a WatchService.

Java NIO API.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. WatchKey
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def cancel(implicit trace: ZTraceElement): UIO[Unit]

    Permalink

    Cancels the registration with the watch service.

    Cancels the registration with the watch service. Upon return the watch key will be invalid. If the watch key is enqueued, waiting to be retrieved from the watch service, then it will remain in the queue until it is removed. Pending events, if any, remain pending and may be retrieved by invoking the pollEvents method after the key is cancelled. If this watch key has already been cancelled then invoking this method has no effect. Once cancelled, a watch key remains forever invalid.

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

    Permalink
    Definition Classes
    Any
  13. def isValid(implicit trace: ZTraceElement): UIO[Boolean]

    Permalink
  14. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  17. def pollEvents(implicit trace: ZTraceElement): UIO[List[WatchEvent[_]]]

    Permalink

    Retrieves and removes all pending events for this watch key.

    Retrieves and removes all pending events for this watch key.

    This does not block, it will immediately return an empty list if there are no events pending. Typically, this key should be reset after processing the returned events, the pollEventsScoped method can be used to do this automatically and reliably.

  18. def pollEventsScoped(implicit trace: ZTraceElement): ZIO[Scope, Nothing, List[WatchEvent[_]]]

    Permalink

    Retrieves and removes all pending events for this watch key as a scoped resource.

    Retrieves and removes all pending events for this watch key as a scoped resource.

    This does not block, it will immediately return an empty list if there are no events pending. When the Scope is closed, this key will be reset.

  19. def reset(implicit trace: ZTraceElement): UIO[Boolean]

    Permalink

    Resets this watch key, making it eligible to be re-queued in the WatchService.

    Resets this watch key, making it eligible to be re-queued in the WatchService. A key is typically reset after all the pending events retrieved from pollEvents have been processed. Use pollEventsScop[ed to automatically and reliably perform a reset.

  20. def resolveEventPath(event: WatchEvent[_]): Option[Path]

    Permalink

    Convenience method to construct the complete path indicated by a WatchEvent.

    Convenience method to construct the complete path indicated by a WatchEvent.

    If both the following are true:

    1. This key's watchable is a filesystem path 2. The event has a path as its context

    then this method returns a path with the event's path resolved against this key's path, (key path) / (event path).

    If either of the above conditions don't hold, None is returned. The conditions will always hold when watching file system paths.

  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( ... )
  26. def watchable: Watchable

    Permalink

    Returns the object for which this watch key was created.

Inherited from AnyRef

Inherited from Any

Ungrouped