Package org.apache.commons.configuration
Class Lock
- java.lang.Object
-
- org.apache.commons.configuration.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 ofLock
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.
-
-
-
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 classjava.lang.Object
- Returns:
- a string for this object
-
-