|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.infinispan.lucene.readlocks.LocalLockMergingSegmentReadLocker
public class LocalLockMergingSegmentReadLocker
LocalLockMergingSegmentReadLocker decorates the DistributedSegmentReadLocker
to minimize
remote operations in case several IndexReaders are opened on the same InfinispanDirectory
.
It keeps track of locks which where already acquired for a specific filename from another request on
the same node and merges the request so that the different clients share the same remote lock.
Constructor Summary | |
---|---|
LocalLockMergingSegmentReadLocker(Cache locksCache,
Cache chunksCache,
Cache metadataCache,
String indexName)
Create a new LocalLockMergingSegmentReadLocker with special purpose caches |
|
LocalLockMergingSegmentReadLocker(Cache cache,
String indexName)
Create a new LocalLockMergingSegmentReadLocker for specified cache and index name. |
Method Summary | |
---|---|
boolean |
acquireReadLock(String name)
Acquires a readlock, in order to prevent other invocations to SegmentReadLocker.deleteOrReleaseReadLock(String)
from deleting the file. |
boolean |
aquireReadLock(String filename)
Deprecated. |
void |
deleteOrReleaseReadLock(String name)
It will release a previously acquired readLock, or if no readLock was acquired it will mark the file to be deleted as soon as all pending locks are releases. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocalLockMergingSegmentReadLocker(Cache cache, String indexName)
cache
- indexName
- public LocalLockMergingSegmentReadLocker(Cache locksCache, Cache chunksCache, Cache metadataCache, String indexName)
locksCache
- the cache to be used to store distributed lockschunksCache
- the cache containing the chunks, this is where the bulk of data is storedmetadataCache
- smaller cache for the metadata of stored elementsindexName
- Method Detail |
---|
@Deprecated public boolean aquireReadLock(String filename)
aquireReadLock
in interface SegmentReadLocker
public boolean acquireReadLock(String name)
SegmentReadLocker.deleteOrReleaseReadLock(String)
from deleting the file.
acquireReadLock
in interface SegmentReadLocker
InfinispanDirectory.openInput(String)
public void deleteOrReleaseReadLock(String name)
deleteOrReleaseReadLock
in interface SegmentReadLocker
name
- of the file to release or deleteInfinispanDirectory.deleteFile(String)
|
--> | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |