Class Lock

  • All Implemented Interfaces:
    java.io.Serializable

    public class Lock
    extends java.lang.Object
    implements java.io.Serializable
    Class to describe a lock. It is returned by the lock operation.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String comment
      the comment provided during the lock operation
      private long creationDate
      the date when the lock was created
      private long expirationDate
      the date when the lock will expire
      private java.lang.String owner
      the owner of the lock
      private java.lang.String path
      the path of the locked item
      private static long serialVersionUID  
      private java.lang.String token
      the token provided during the lock operation
    • Constructor Summary

      Constructors 
      Constructor Description
      Lock​(java.lang.String owner, java.lang.String path, java.lang.String token, java.lang.String comment, long creationDate, long expirationDate)
      this constructor should only called from JNI code
    • Field Detail

      • owner

        private java.lang.String owner
        the owner of the lock
      • path

        private java.lang.String path
        the path of the locked item
      • token

        private java.lang.String token
        the token provided during the lock operation
      • comment

        private java.lang.String comment
        the comment provided during the lock operation
      • creationDate

        private long creationDate
        the date when the lock was created
      • expirationDate

        private long expirationDate
        the date when the lock will expire
    • Constructor Detail

      • Lock

        public Lock​(java.lang.String owner,
                    java.lang.String path,
                    java.lang.String token,
                    java.lang.String comment,
                    long creationDate,
                    long expirationDate)
        this constructor should only called from JNI code
        Parameters:
        owner - the owner of the lock
        path - the path of the locked item
        token - the lock token
        comment - the lock comment
        creationDate - the date when the lock was created
        expirationDate - the date when the lock will expire
    • Method Detail

      • getOwner

        public java.lang.String getOwner()
        Returns:
        the owner of the lock
      • getPath

        public java.lang.String getPath()
        Returns:
        the path of the locked item
      • getToken

        public java.lang.String getToken()
        Returns:
        the token provided during the lock operation
      • getComment

        public java.lang.String getComment()
        Returns:
        the comment provided during the lock operation
      • getCreationDate

        public java.util.Date getCreationDate()
        Returns:
        the date the lock was created
      • getExpirationDate

        public java.util.Date getExpirationDate()
        Returns:
        the date when the lock will expire