Class Lock


  • public class Lock
    extends java.lang.Object

    A simple class acting as lock.

    Instances of this class are used by some configuration classes to synchronize themselves.

    Since:
    1.7
    Version:
    $Id: Lock.java 1301995 2012-03-17 20:24:16Z sebb $
    Author:
    Commons Configuration team
    • Constructor Summary

      Constructors 
      Constructor Description
      Lock​(java.lang.String name)
      Creates a new instance of Lock with the specified name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()
      Returns the name of this lock.
      java.lang.String toString()
      Returns a string representation of this object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Lock

        public Lock​(java.lang.String name)
        Creates a new instance of Lock with the specified name.
        Parameters:
        name - the name of this lock
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name of this lock.
        Returns:
        the name of this lock
      • toString

        public java.lang.String toString()
        Returns a string representation of this object. This implementation returns a string which contains the lock name and the instance ID.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a string for this object