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 acquireReadLock(String filename)
          doesn't do anything and returns true
 boolean aquireReadLock(String filename)
          Deprecated. 
 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

acquireReadLock

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

Specified by:
acquireReadLock 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)

aquireReadLock

@Deprecated
public boolean aquireReadLock(String filename)
Deprecated. 

Specified by:
aquireReadLock in interface SegmentReadLocker

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)

-->

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