org.exoplatform.services.jcr.ext.replication.recovery
Class RecoveryWriter

java.lang.Object
  extended by org.exoplatform.services.jcr.ext.replication.recovery.AbstractFSAccess
      extended by org.exoplatform.services.jcr.ext.replication.recovery.RecoveryWriter

public class RecoveryWriter
extends AbstractFSAccess

Created by The eXo Platform SAS.

Version:
$Id: RecoveryWriter.java 35186 2009-08-07 14:23:43Z pnedonosko $
Author:
Alex Reshetnyak

Field Summary
 
Fields inherited from class org.exoplatform.services.jcr.ext.replication.recovery.AbstractFSAccess
BUFFER_1KB, BUFFER_20X, BUFFER_8X, DATA_DIR_NAME, PREFIX_CHAR, PREFIX_REMOVED_DATA, REMOVED_SUFFIX
 
Constructor Summary
RecoveryWriter(java.io.File recoveryDir, FileNameFactory fileNameFactory, FileCleaner fileCleaner, java.lang.String ownName)
          RecoveryWriter constructor.
 
Method Summary
 long removeChangesLog(java.util.List<java.lang.String> fileNameList, java.lang.String ownerName)
          removeChangesLog.
 void removeChangesLog(java.lang.String identifier, java.lang.String ownerName)
          removeChangesLog.
 java.lang.String save(java.io.File f, TransactionChangesLog changesLog)
          save.
 java.lang.String save(PendingConfirmationChengesLog confirmationChengesLog)
          save.
 void saveRemoveChangesLog(java.lang.String fileName)
          saveRemoveChangesLog.
 
Methods inherited from class org.exoplatform.services.jcr.ext.replication.recovery.AbstractFSAccess
getAsFile, getAsFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecoveryWriter

public RecoveryWriter(java.io.File recoveryDir,
                      FileNameFactory fileNameFactory,
                      FileCleaner fileCleaner,
                      java.lang.String ownName)
               throws java.io.IOException
RecoveryWriter constructor.

Parameters:
recoveryDir - the recovery directory
fileNameFactory - the FileNameFactory
fileCleaner - the File Cleaner
ownName - the own name
Throws:
java.io.IOException - will be generated the IOException
Method Detail

save

public java.lang.String save(PendingConfirmationChengesLog confirmationChengesLog)
                      throws java.io.IOException
save.

Parameters:
confirmationChengesLog - the PendingConfirmationChengesLog
Returns:
String return the name of file
Throws:
java.io.IOException - will be generated the IOException

save

public java.lang.String save(java.io.File f,
                             TransactionChangesLog changesLog)
                      throws java.io.IOException
save.

Parameters:
f - the file to binary data
changesLog - the ChangesLog
Returns:
String return the name of file
Throws:
java.io.IOException - will be generated the IOException

removeChangesLog

public void removeChangesLog(java.lang.String identifier,
                             java.lang.String ownerName)
                      throws java.io.IOException
removeChangesLog.

Parameters:
identifier - the identification string to ChangesLog
ownerName - the owner name
Throws:
java.io.IOException - will be generated the IOException

removeChangesLog

public long removeChangesLog(java.util.List<java.lang.String> fileNameList,
                             java.lang.String ownerName)
                      throws java.io.IOException
removeChangesLog.

Parameters:
fileNameList - the list of file name
ownerName - the owner name
Returns:
long return the how many files was deleted
Throws:
java.io.IOException - will be generated the IOException

saveRemoveChangesLog

public void saveRemoveChangesLog(java.lang.String fileName)
                          throws java.io.IOException
saveRemoveChangesLog. Save the file name for deleting.

Parameters:
fileName - the file name
Throws:
java.io.IOException - will be generated the IOException


Copyright © 2010 eXo Platform SAS. All Rights Reserved.