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

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

public class RecoveryManager
extends java.lang.Object

Created by The eXo Platform SAS.

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

Constructor Summary
RecoveryManager(java.io.File recoveryDir, java.lang.String ownName, java.lang.String systemId, java.util.List<java.lang.String> participantsClusterList, long waitConformation, java.lang.String repoName, java.lang.String wsName, ChannelManager channelManager)
          RecoveryManager constructor.
 
Method Summary
 void confirmationChengesLogSave(Packet packet)
          confirmationChengesLogSave.
 ChannelManager getChannelManager()
           
 java.util.List<java.lang.String> getInitedParticipantsClusterList()
           
 java.lang.String getOwnName()
           
 java.util.List<java.lang.String> getParticipantsClusterList()
          getParticipantsClusterList.
 PendingConfirmationChengesLog getPendingConfirmationChengesLogById(java.lang.String identifier)
          getPendingConfirmationChengesLogById.
 RecoveryReader getRecoveryReader()
          getRecoveryReader.
 RecoveryWriter getRecoveryWriter()
          getRecoveryWriter.
 java.lang.String getRepositoryName()
           
 java.lang.String getWorkspaceName()
           
 boolean isAllInited()
           
 int processing(Packet packet, int stat)
          processing.
 void remove(java.lang.String identifier)
          remove.
 void removeChangesLog(java.lang.String identifier, java.lang.String ownerName)
          removeChangesLog.
 void save(ItemStateChangesLog cangesLog, java.lang.String identifier)
          save.
 java.lang.String save(java.lang.String identifier)
          save.
 void saveRemovableChangesLog(java.lang.String fileName)
          saveRemovableChangesLog.
 void setDataKeeper(ItemDataKeeper dataKeeper)
          setDataKeeper.
 void startRecovery()
          Will be initialized the recovery.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecoveryManager

public RecoveryManager(java.io.File recoveryDir,
                       java.lang.String ownName,
                       java.lang.String systemId,
                       java.util.List<java.lang.String> participantsClusterList,
                       long waitConformation,
                       java.lang.String repoName,
                       java.lang.String wsName,
                       ChannelManager channelManager)
                throws java.io.IOException
RecoveryManager constructor.

Parameters:
recoveryDir - the recovery dir
ownName - the own name
systemId - the system identification string
participantsClusterList - the other participants
waitConformation - the timeout to confirmation
repoName - the repository name
wsName - the workspace name
channelManager - the ChannelManager
Throws:
java.io.IOException - will be generated the IOException
Method Detail

save

public void save(ItemStateChangesLog cangesLog,
                 java.lang.String identifier)
          throws java.io.IOException
save.

Parameters:
cangesLog - the ChangesLog with data
identifier - the identifier to ChangesLog
Throws:
java.io.IOException - will be generated the IOException

confirmationChengesLogSave

public void confirmationChengesLogSave(Packet packet)
confirmationChengesLogSave.

Parameters:
packet - the Packet with confirmation

removeChangesLog

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

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

save

public java.lang.String save(java.lang.String identifier)
                      throws java.io.IOException
save.

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

saveRemovableChangesLog

public void saveRemovableChangesLog(java.lang.String fileName)
                             throws java.io.IOException
saveRemovableChangesLog.

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

remove

public void remove(java.lang.String identifier)
remove.

Parameters:
identifier - the identifier to ChangesLog

getPendingConfirmationChengesLogById

public PendingConfirmationChengesLog getPendingConfirmationChengesLogById(java.lang.String identifier)
                                                                   throws java.lang.Exception
getPendingConfirmationChengesLogById.

Parameters:
identifier - the identifier to ChangesLog
Returns:
PendingConfirmationChengesLog return the PendingConfirmationChengesLog
Throws:
java.lang.Exception - will be generated the Exception

processing

public int processing(Packet packet,
                      int stat)
               throws java.lang.Exception
processing.

Parameters:
packet - the Packet with data
stat - before state
Returns:
int after state
Throws:
java.lang.Exception - will be generated the Exception

setDataKeeper

public void setDataKeeper(ItemDataKeeper dataKeeper)
setDataKeeper.

Parameters:
dataKeeper - the ItemDataKeeper

getParticipantsClusterList

public java.util.List<java.lang.String> getParticipantsClusterList()
getParticipantsClusterList.

Returns:
List return the other participants

isAllInited

public boolean isAllInited()

getInitedParticipantsClusterList

public java.util.List<java.lang.String> getInitedParticipantsClusterList()

getOwnName

public java.lang.String getOwnName()

getWorkspaceName

public java.lang.String getWorkspaceName()

getRepositoryName

public java.lang.String getRepositoryName()

getChannelManager

public ChannelManager getChannelManager()

startRecovery

public void startRecovery()
Will be initialized the recovery.


getRecoveryWriter

public RecoveryWriter getRecoveryWriter()
getRecoveryWriter.

Returns:
RecoveryWriter return the RecoveryWriter

getRecoveryReader

public RecoveryReader getRecoveryReader()
getRecoveryReader.

Returns:
RecoveryReader return the RecoveryReader


Copyright © 2010 eXo Platform SAS. All Rights Reserved.