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
Class MockLockFactoryWrapper

    java.lang.Object
      org.apache.lucene.store.LockFactory
          org.apache.lucene.store.MockLockFactoryWrapper

    public class MockLockFactoryWrapper

extends LockFactory

Used by MockDirectoryWrapper to wrap another factory and track open locks.

Field Summary

Fields inherited from class org.apache.lucene.store.LockFactory
`lockPrefix`

Constructor Summary
`MockLockFactoryWrapper(MockDirectoryWrapper dir, LockFactory delegate)`

Method Summary
`void` | `clearLock(String lockName)` Attempt to clear (forcefully unlock and remove) the specified lock.
`String` | `getLockPrefix()` Get the prefix in use for all locks created in this LockFactory.
`Lock` | `makeLock(String lockName)` Return a new Lock instance identified by lockName.
`void` | `setLockPrefix(String lockPrefix)` Set the prefix in use for all locks created in this LockFactory.
`String` | `toString()`

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

Constructor Detail

### MockLockFactoryWrapper

    public MockLockFactoryWrapper(MockDirectoryWrapper dir,
                                  LockFactory delegate)

Method Detail

### setLockPrefix

    public void setLockPrefix(String lockPrefix)

  Description copied from class: `LockFactory`
  Set the prefix in use for all locks created in this LockFactory. This is normally called once, when a Directory gets this LockFactory instance. However, you can also call this (after this instance is assigned to a Directory) to override the prefix in use. This is helpful if you're running Lucene on machines that have different mount points for the same shared directory.

  Overrides:
    `setLockPrefix` in class `LockFactory`

### getLockPrefix

    public String getLockPrefix()

  Description copied from class: `LockFactory`
  Get the prefix in use for all locks created in this LockFactory.

  Overrides:
    `getLockPrefix` in class `LockFactory`

### makeLock

    public Lock makeLock(String lockName)

  Description copied from class: `LockFactory`
  Return a new Lock instance identified by lockName.

  Specified by:
    `makeLock` in class `LockFactory`
  Parameters:
    `lockName` - name of the lock to be created.

### clearLock

    public void clearLock(String lockName)
                   throws IOException

  Description copied from class: `LockFactory`
  Attempt to clear (forcefully unlock and remove) the specified lock. Only call this at a time when you are certain this lock is no longer in use.

  Specified by:
    `clearLock` in class `LockFactory`
  Parameters:
    `lockName` - name of the lock to be cleared.
  Throws:
    `IOException`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

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