public class SingleInstanceLockFactory extends LockFactory
Implements {@link LockFactory} for a single in-process instance,
meaning all locking will take place through this one instance.
Only use this {@link LockFactory} when you are certain all
IndexReaders and IndexWriters for a given index are running
against a single shared in-process Directory instance. This is
currently the default locking for RAMDirectory.
// We do not use the LockPrefix at all, because the private
// HashSet instance effectively scopes the locking to this
// single Directory instance.
return new SingleInstanceLock(locks, lockName);