public final class SingleInstanceLockFactory extends LockFactory
LockFactoryfor a single in-process instance, meaning all locking will take place through this one instance. Only use this
LockFactorywhen you are certain all IndexWriters for a given index are running against a single shared in-process Directory instance. This is currently the default locking for RAMDirectory.
|Constructor and Description|
|Modifier and Type||Method and Description|
Return a new obtained Lock instance identified by lockName.
public Lock obtainLock(Directory dir, String lockName) throws IOException
lockName- name of the lock to be created.
LockObtainFailedException- (optional specific exception) if the lock could not be obtained because it is currently held elsewhere.
IOException- if any i/o error occurs attempting to gain the lock
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.