jruby/docs BETA
Navigation
org.apache.lucene.store 54
C AlreadyClosedException
C BaseDirectory
C BufferedChecksum
C BufferedChecksumIndexInput
C BufferedIndexInput
C ByteArrayDataInput
C ByteArrayDataOutput
C ByteBuffersDataInput
C ByteBuffersDataOutput
C ByteBuffersDirectory
C ByteBuffersIndexInput
C ByteBuffersIndexOutput
C ChecksumIndexInput
E DataAccessHint
C DataInput
C DataOutput
C Directory
C FSDirectory
C FSLockFactory
E FileDataHint
C FileSwitchDirectory
E FileTypeHint
C FilterDirectory
C FilterIndexInput
C FilterIndexOutput
I IOContext
C IndexInput
C IndexOutput
C InputStreamDataInput
C Lock
C LockFactory
C LockObtainFailedException
C LockReleaseFailedException
C LockStressTest
C LockValidatingDirectoryWrapper
C LockVerifyServer
C MMapDirectory
C NIOFSDirectory
C NRTCachingDirectory
C NativeFSLockFactory
C NoLockFactory
C OutputStreamDataOutput
C OutputStreamIndexOutput
E PreloadHint
I RandomAccessInput
C RateLimitedIndexOutput
C RateLimiter
E ReadAdvice
E ReadOnceHint
C SimpleFSLockFactory
C SingleInstanceLockFactory
C SleepingLockWrapper
C TrackingDirectoryWrapper
C VerifyingLockFactory
LockFactory — members 2
C new()
M obtain_lock(dir, lock_name) Lock

org.apache.lucene.store.LockFactory

class abstract 2 members

Base class for Locking implementation. Directory uses instances of this class to implement locking.

Lucene uses NativeFSLockFactory by default for FSDirectory-based index directories.

Special care needs to be taken if you change the locking implementation: First be certain that no writer is in fact writing to the index otherwise you can easily corrupt your index. Be sure to do the LockFactory change on all Lucene instances and clean up all leftover lock files before starting the new configuration for the first time. Different implementations can not work together!

If you suspect that some LockFactory implementation is not working properly in your environment, you can easily test it by using VerifyingLockFactory, LockVerifyServer and LockStressTest.

Constructors

new

new ( )
Java: <init>()

Instance Methods

obtain_lock

Lock obtain_lock ( Directory dir, String lock_name )
Java: obtainLock(org.apache.lucene.store.Directory dir, String lockName)

Return a new obtained Lock instance identified by lockName.

nametypedescription
lock_nameStringname of the lock to be created.

Throws

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
this work for additional information regarding copyright ownership.