Package org.infinispan.lucene.readlocks
Class NoopSegmentReadLocker
- java.lang.Object
-
- org.infinispan.lucene.readlocks.NoopSegmentReadLocker
-
- All Implemented Interfaces:
SegmentReadLocker
public class NoopSegmentReadLocker extends Object implements SegmentReadLocker
NoopSegmentReadLocker ignores requests to apply a readlock, but also ignores requests to delete files. It might be a good choice for read-only indexes, or cases in which leaving unused segments in the index is not considered a problem.- Since:
- 4.1
- Author:
- Sanne Grinovero
-
-
Constructor Summary
Constructors Constructor Description NoopSegmentReadLocker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
acquireReadLock(String filename)
doesn't do anything and returns truevoid
deleteOrReleaseReadLock(String filename)
doesn't do anything
-
-
-
Method Detail
-
acquireReadLock
public boolean acquireReadLock(String filename)
doesn't do anything and returns true- Specified by:
acquireReadLock
in interfaceSegmentReadLocker
- Parameters:
filename
- of the file to acquire the lock at- Returns:
- true if the lock was acquired, false if the implementation detects the file does not exist, or that it's being deleted by some other thread.
- See Also:
Directory.openInput(java.lang.String, org.apache.lucene.store.IOContext)
-
deleteOrReleaseReadLock
public void deleteOrReleaseReadLock(String filename)
doesn't do anything- Specified by:
deleteOrReleaseReadLock
in interfaceSegmentReadLocker
- Parameters:
filename
- of the file to release or delete- See Also:
Directory.deleteFile(String)
-
-