|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SegmentReadLocker
SegmentReadLocker implementations have to make sure that segments are not deleted while they are being used by an IndexReader.
When an InfinispanIndexInput
is opened on a file which is split in smaller chunks,
aquireReadLock(String)
is invoked; then the deleteOrReleaseReadLock(String)
is
invoked when the stream is closed.
The same deleteOrReleaseReadLock(String)
is invoked when a file is deleted, so if this invocation is not balancing
a lock acquire this implementation must delete all segment chunks and the associated metadata.
Method Summary | |
---|---|
boolean |
aquireReadLock(String filename)
Acquires a readlock, in order to prevent other invocations to deleteOrReleaseReadLock(String)
from deleting the file. |
void |
deleteOrReleaseReadLock(String fileName)
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. |
Method Detail |
---|
void deleteOrReleaseReadLock(String fileName)
fileName
- of the file to release or deleteInfinispanDirectory.deleteFile(String)
boolean aquireReadLock(String filename)
deleteOrReleaseReadLock(String)
from deleting the file.
filename
-
InfinispanDirectory.openInput(String)
|
Google Analytics | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |