## org.apache.commons.configuration
Class Lock

    java.lang.Object
      org.apache.commons.configuration.Lock

    public class Lock

extends 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 1162387 2011-08-27 16:05:20Z oheger $
Author:
  Commons Configuration team

Constructor Summary
`Lock(String name)` Creates a new instance of `Lock` with the specified name.

Method Summary
`String` `getName()` Returns the name of this lock.
`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(String name)

  Creates a new instance of `Lock` with the specified name.

  Parameters:
    `name` - the name of this lock

Method Detail

### getName

    public String getName()

  Returns the name of this lock.

  Returns:
    the name of this lock

### toString

    public 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 `Object`
  Returns:
    a string for this object

Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.