org.sakaiproject.search.journal.impl
Class SharedFilesystemJournalStorage

java.lang.Object
  extended by org.sakaiproject.search.journal.impl.SharedFilesystemJournalStorage
All Implemented Interfaces:
JournalStorage

public class SharedFilesystemJournalStorage
extends Object
implements JournalStorage

Author:
ieb TODO Unit test

Constructor Summary
SharedFilesystemJournalStorage()
           
 
Method Summary
 void close(IndexTransaction transaction)
           
 void commitSave(JournalStorageState jss)
          perform the commit on the transaction in jss
 void destroy()
           
 JournalSettings getJournalSettings()
           
 File getLocalJournalLocation(long savePoint, String workingSpace)
           
 void init()
           
 JournalStorageState prepareSave(String location, long transactionId)
          prepare the current transaction for commit, 2PC
 void removeJournal(long savePoint)
           
 void retrieveSavePoint(long savePoint, String workingSpace)
          Get a savePoint from the committed store into a permanent local space, indexed on the transaction or savePoint id
 void rollbackSave(JournalStorageState jss)
          rollback the transaction in jss
 void setJournalSettings(JournalSettings journalSettings)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SharedFilesystemJournalStorage

public SharedFilesystemJournalStorage()
Method Detail

init

public void init()

destroy

public void destroy()

prepareSave

public JournalStorageState prepareSave(String location,
                                       long transactionId)
                                throws IOException
Description copied from interface: JournalStorage
prepare the current transaction for commit, 2PC

Specified by:
prepareSave in interface JournalStorage
Returns:
Throws:
IOException

commitSave

public void commitSave(JournalStorageState jss)
                throws IOException
Description copied from interface: JournalStorage
perform the commit on the transaction in jss

Specified by:
commitSave in interface JournalStorage
Throws:
IOException

rollbackSave

public void rollbackSave(JournalStorageState jss)
Description copied from interface: JournalStorage
rollback the transaction in jss

Specified by:
rollbackSave in interface JournalStorage

retrieveSavePoint

public void retrieveSavePoint(long savePoint,
                              String workingSpace)
                       throws IOException
Description copied from interface: JournalStorage
Get a savePoint from the committed store into a permanent local space, indexed on the transaction or savePoint id

Specified by:
retrieveSavePoint in interface JournalStorage
Throws:
IOException
IOException
See Also:
org.sakaiproject.search.maintanence.api.JournalStorage#retrieveLaterSavePoints(long[], java.lang.String)

close

public void close(IndexTransaction transaction)
           throws IndexTransactionException
Throws:
IndexTransactionException
See Also:
TransactionListener.close(org.sakaiproject.search.transaction.api.IndexTransaction)

getLocalJournalLocation

public File getLocalJournalLocation(long savePoint,
                                    String workingSpace)
Parameters:
savePoint -
workingSpace -
Returns:

removeJournal

public void removeJournal(long savePoint)
                   throws IOException
Parameters:
savePoint -
Throws:
IOException

getJournalSettings

public JournalSettings getJournalSettings()
Returns:
the journalSettings

setJournalSettings

public void setJournalSettings(JournalSettings journalSettings)
Parameters:
journalSettings - the journalSettings to set


Copyright © 2003-2012 Sakai Project. All Rights Reserved.