Class/Object

zio.nio.channels

FileLock

Related Docs: object FileLock | package channels

Permalink

final class FileLock extends AnyRef

A token representing a lock on a region of a file. A file-lock object is created each time a lock is acquired on a file via one of the lock or tryLock methods of the FileChannel class, or the lock or tryLock methods of the AsynchronousFileChannel class.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FileLock
  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. def acquiredBy: Channel

    Permalink

    The channel upon whose file this lock was acquired.

    The channel upon whose file this lock was acquired. If the underlying NIO channel is a standard channel type, the appropriate ZIO-NIO wrapper class is returned, otherwise a generic zio.nio.channels.Channel is returned.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  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 isShared: Boolean

    Permalink

    Tells whether this lock is shared.

  14. def isValid(implicit trace: ZTraceElement): UIO[Boolean]

    Permalink

    Tells whether or not this lock is valid.

    Tells whether or not this lock is valid. A lock object remains valid until it is released or the associated file channel is closed, whichever comes first.

  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. def overlaps(position: Long, size: Long): Boolean

    Permalink

    Tells whether or not this lock overlaps the given lock range.

    Tells whether or not this lock overlaps the given lock range.

    position

    The starting position of the lock range

    size

    The size of the lock range

  19. def position: Long

    Permalink

    Returns the position within the file of the first byte of the locked region.

    Returns the position within the file of the first byte of the locked region. A locked region need not be contained within, or even overlap, the actual underlying file, so the value returned by this method may exceed the file's current size.

  20. def release(implicit trace: ZTraceElement): IO[IOException, Unit]

    Permalink
  21. def size: Long

    Permalink

    Returns the size of the locked region in bytes.

    Returns the size of the locked region in bytes. A locked region need not be contained within, or even overlap, the actual underlying file, so the value returned by this method may exceed the file's current size.

  22. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped