Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.store.db
Class DbLock

    java.lang.Object
      org.apache.lucene.store.Lock
          org.apache.lucene.store.db.DbLock

    public class DbLock

extends Lock

This implementation of `Lock` is trivial as `DbDirectory` operations are managed by the Berkeley DB locking system.

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.lucene.store.Lock
`Lock.With`

Field Summary

Fields inherited from class org.apache.lucene.store.Lock
`failureReason, LOCK_OBTAIN_WAIT_FOREVER, LOCK_POLL_INTERVAL`

Constructor Summary
`DbLock()`

Method Summary
`boolean` | `isLocked()` Returns true if the resource is currently locked.
`boolean` | `obtain()` Attempts to obtain exclusive access and immediately return upon success or failure.
`void` | `release()` Releases exclusive access.

Methods inherited from class org.apache.lucene.store.Lock
`obtain`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DbLock

    public DbLock()

Method Detail

### obtain

    public boolean obtain()

  Description copied from class: `Lock`
  Attempts to obtain exclusive access and immediately return upon success or failure.

  Specified by:
    `obtain` in class `Lock`
  Returns:
    true iff exclusive access is obtained

### release

    public void release()

  Description copied from class: `Lock`
  Releases exclusive access.

  Specified by:
    `release` in class `Lock`

### isLocked

    public boolean isLocked()

  Description copied from class: `Lock`
  Returns true if the resource is currently locked. Note that one must still call `Lock.obtain()` before using the resource.

  Specified by:
    `isLocked` in class `Lock`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2009 Apache Software Foundation. All Rights Reserved.