org.xcmis.search.lucene.index
Class FileSystemTransactionLog

java.lang.Object
  extended by org.xcmis.search.lucene.index.FileSystemTransactionLog
All Implemented Interfaces:
TransactionLog

public class FileSystemTransactionLog
extends Object
implements TransactionLog

Created by The eXo Platform SAS.

Version:
$Id: FileSystemTransactionLog.java 2 2010-02-04 17:21:49Z andrew00x $
Author:
Sergey Kabashnyuk

Field Summary
static int LOG_DIR_COUNT
           
 
Constructor Summary
FileSystemTransactionLog(File srcFile, FSIndexTransactionService storage)
          Constructor for recovery case.
FileSystemTransactionLog(Set<String> addedDocumentsUuids, Set<String> removedDocumentsUuids, FSIndexTransactionService storage)
          Constructor for ordinary case.
 
Method Summary
 Set<String> getAddedList()
          Returns set of added uuid.
 Set<String> getRemovedList()
          Returns set of removed uuid.
 void load()
          Load transaction from storage.
 void log()
          Log transaction to storage.
 void removeLog()
          Remove logged transaction from storage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_DIR_COUNT

public static final int LOG_DIR_COUNT
See Also:
Constant Field Values
Constructor Detail

FileSystemTransactionLog

public FileSystemTransactionLog(File srcFile,
                                FSIndexTransactionService storage)
                         throws TransactionLogException
Constructor for recovery case.

Parameters:
srcFile - - source file.
storage - - transaction storage.
Throws:
TransactionLogException

FileSystemTransactionLog

public FileSystemTransactionLog(Set<String> addedDocumentsUuids,
                                Set<String> removedDocumentsUuids,
                                FSIndexTransactionService storage)
Constructor for ordinary case.

Parameters:
indexTransaction - - IndexTransaction
storage - - transaction storage.
rootDir - - Root directory file.
Method Detail

getAddedList

public Set<String> getAddedList()
                         throws TransactionLogException
Returns set of added uuid.

Specified by:
getAddedList in interface TransactionLog
Returns:
Set of added uuid.
Throws:
TransactionLogException

getRemovedList

public Set<String> getRemovedList()
                           throws TransactionLogException
Returns set of removed uuid.

Specified by:
getRemovedList in interface TransactionLog
Returns:
Set of removed uuid.
Throws:
TransactionLogException

load

public void load()
          throws TransactionLogException
Load transaction from storage.

Specified by:
load in interface TransactionLog
Throws:
TransactionLogException - - on load transaction log exception.

log

public void log()
         throws TransactionLogException
Log transaction to storage.

Specified by:
log in interface TransactionLog
Throws:
TransactionLogException - - on log transaction log exception.

removeLog

public void removeLog()
               throws TransactionLogException
Remove logged transaction from storage.

Specified by:
removeLog in interface TransactionLog
Throws:
TransactionLogException - - on remove transaction log exception.


Copyright © 2010 eXo Platform SAS. All Rights Reserved.