Class HostLock

java.lang.Object
org.tasktide.mutex.model.HostLock

public class HostLock extends Object
Model class to hold host file lock data
  • Constructor Details

    • HostLock

      public HostLock(Path targetFile)
      Create OS process lock on target file
      Parameters:
      targetFile -
  • Method Details

    • getFileChannel

      public FileChannel getFileChannel()
      Get file channel
      Returns:
      FileChannel
    • setFileChannel

      public void setFileChannel(FileChannel fileChannel)
      Set file channel
      Parameters:
      fileChannel -
    • getFileLock

      public FileLock getFileLock()
      Get file lock
      Returns:
      FileLock
    • setFileLock

      public void setFileLock(FileLock fileLock)
      Parameters:
      fileLock -
    • getId

      public String getId()
      Get Id for host lock
      Returns:
      String
    • getTargetFile

      public Path getTargetFile()
      Get target file for host lock
      Returns:
      Path
    • toJson

      public String toJson()
      Represent as JSON document
      Returns:
      String
    • toString

      public String toString()
      Represent as string
      Overrides:
      toString in class Object
      Returns:
      String