org.infinispan.lucene.readlocks
Class NoopSegmentReadLocker

java.lang.Object
  extended by 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
NoopSegmentReadLocker()
           
 
Method Summary
 boolean aquireReadLock(String filename)
          doesn't do anything and returns true
 void deleteOrReleaseReadLock(String filename)
          doesn't do anything
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoopSegmentReadLocker

public NoopSegmentReadLocker()
Method Detail

aquireReadLock

public boolean aquireReadLock(String filename)
doesn't do anything and returns true

Specified by:
aquireReadLock in interface SegmentReadLocker
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:
InfinispanDirectory.openInput(String)

deleteOrReleaseReadLock

public void deleteOrReleaseReadLock(String filename)
doesn't do anything

Specified by:
deleteOrReleaseReadLock in interface SegmentReadLocker
Parameters:
filename - of the file to release or delete
See Also:
InfinispanDirectory.deleteFile(String)

Google Analytics

Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.