|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xcmis.search.lucene.index.ReadWriteDirectoryFactory
public class ReadWriteDirectoryFactory
Created by The eXo Platform SAS.
Date:
| Constructor Summary | |
|---|---|
ReadWriteDirectoryFactory()
Constructor. |
|
| Method Summary | |
|---|---|
File |
createFile(File dir,
String fileName,
int dirCount)
Create file with locking of dirCount parent directories. |
void |
lock(String dir)
|
void |
lockRead(String dir)
|
void |
removeDirectory(File dir,
int dirCount)
Try remove directory and parent directories. |
boolean |
tryLock(String dir)
|
void |
unlock(String dir)
|
void |
unlockRead(String dir)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReadWriteDirectoryFactory()
| Method Detail |
|---|
public File createFile(File dir,
String fileName,
int dirCount)
throws IOException,
TransactionLogException
dirCount parent directories.
createFile in interface ConcurrentDirectoryFactorydir - - parent directory of filefileName - - name of filedirCount - - count of parent directories that will be locked during
create file execution
IOException - - I/O Exception
TransactionLogException - - if file already exist, or file or it's
parent directory was not created (or not exist)public void lock(String dir)
public void lockRead(String dir)
public void removeDirectory(File dir,
int dirCount)
throws TransactionLogException
dirCount.
removeDirectory in interface ConcurrentDirectoryFactorydir - - directory to remove.dirCount - - maximum count of removed directories. dir
counted to.
TransactionLogException - - if directory do not contain subfiles, but
was not removed.public boolean tryLock(String dir)
public void unlock(String dir)
public void unlockRead(String dir)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||