Package hec.io

Class FileLock

java.lang.Object
hec.io.FileLock
All Implemented Interfaces:
Serializable

public class FileLock extends Object implements Serializable
See Also:
  • Field Details

  • Constructor Details

    • FileLock

      public FileLock(String userId, int lockType)
      create a new FileLock with the specified userId and Locktype.
  • Method Details

    • getLockType

      public int getLockType()
    • getUserId

      public String getUserId()
    • getLockedTime

      public long getLockedTime()
    • setLockedTime

      public void setLockedTime(long lockedTime)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equals

      public boolean equals(FileLock fl)
    • getRefCount

      public int getRefCount()
    • incrementRefCount

      public int incrementRefCount()
    • decrementRefCount

      public int decrementRefCount()
    • getLockTypeString

      public String getLockTypeString()
    • getLockTypeString

      public static String getLockTypeString(int lockType)
    • getUnlockForLock

      public static FileLock getUnlockForLock(FileLock fLock)
      return the FileLock to unlock the specified FileLock
    • isUnlockType

      public static boolean isUnlockType(int lockType)