Class PendingChangesLog

java.lang.Object
org.exoplatform.services.jcr.ext.backup.impl.PendingChangesLog

public class PendingChangesLog extends Object
Created by The eXo Platform SAS.
Version:
$Id: PendingChangesLog.java 31768 2009-05-14 09:35:43Z pnedonosko $
Author:
Alex Reshetnyak
  • Constructor Details

    • PendingChangesLog

      public PendingChangesLog(org.exoplatform.services.jcr.dataflow.TransactionChangesLog itemDataChangesLog, org.exoplatform.services.jcr.impl.util.io.FileCleaner fileCleaner) throws IOException
      PendingChangesLog constructor.
      Parameters:
      itemDataChangesLog - ChangesLog with data
      fileCleaner - the FileCleaner
      Throws:
      IOException - will be generated the IOExaption
    • PendingChangesLog

      public PendingChangesLog(org.exoplatform.services.jcr.dataflow.TransactionChangesLog itemDataChangesLog, String identifier, int type, org.exoplatform.services.jcr.impl.util.io.FileCleaner fileCleaner) throws IOException
      PendingChangesLog constructor.
      Parameters:
      itemDataChangesLog - ChangesLog with data
      identifier - identifier to this PendingChangesLog.
      type - type of PendingChangesLog
      fileCleaner - the FileCleaner
      Throws:
      IOException - will be generated the IOExaption
    • PendingChangesLog

      public PendingChangesLog(String identifier, int dataLength)
      PendingChangesLog constructor.
      Parameters:
      identifier - identifier to this PendingChangesLog.
      dataLength - the length of binary data
    • PendingChangesLog

      public PendingChangesLog(org.exoplatform.services.jcr.dataflow.TransactionChangesLog transactionChangesLog, List<FixupStream> listFixupStreams, List<org.exoplatform.services.jcr.impl.util.io.SpoolFile> listFiles, org.exoplatform.services.jcr.impl.util.io.FileCleaner fileCleaner)
      PendingChangesLog constructor.
      Parameters:
      transactionChangesLog - ChangesLog with data
      listFixupStreams - list of FixupStreams
      listFiles - list of Files
      fileCleaner - the FileCleaner
  • Method Details

    • putData

      public void putData(int offset, byte[] tempData)
      putData.
      Parameters:
      offset - offset in 'data'
      tempData - piece of binary data
    • getData

      public byte[] getData()
      getData.
      Returns:
      byte[] return the binary data
    • getItemDataChangesLog

      public org.exoplatform.services.jcr.dataflow.TransactionChangesLog getItemDataChangesLog()
      getItemDataChangesLog.
      Returns:
      TransactionChangesLog return the ChangesLog
    • getInputStreams

      public List<InputStream> getInputStreams()
      getInputStreams.
      Returns:
      List return the list of input streams
    • getListRandomAccessFiles

      public List<RandomAccessFile> getListRandomAccessFiles()
      getListRandomAccessFiles.
      Returns:
      List return the list of RandomAccessFiles
    • getListFile

      public List<org.exoplatform.services.jcr.impl.util.io.SpoolFile> getListFile()
      getListFile.
      Returns:
      List return list of Files
    • getFixupStreams

      public List<FixupStream> getFixupStreams()
      getFixupStreams.
      Returns:
      List return list of FixupStreams
    • getConteinerType

      public int getConteinerType()
      getConteinerType.
      Returns:
      int return the type of ChangesLog
    • getIdentifier

      public String getIdentifier()
      getIdentifier.
      Returns:
      String return the identifier string
    • getAsByteArray

      public static byte[] getAsByteArray(org.exoplatform.services.jcr.dataflow.TransactionChangesLog dataChangesLog) throws IOException
      getAsByteArray. Make the array of bytes from ChangesLog.
      Parameters:
      dataChangesLog - the ChangesLog with data
      Returns:
      byte[] return the serialized ChangesLog
      Throws:
      IOException - will be generated the IOException
    • getAsItemDataChangesLog

      public static org.exoplatform.services.jcr.dataflow.TransactionChangesLog getAsItemDataChangesLog(byte[] byteArray) throws IOException, ClassNotFoundException
      getAsItemDataChangesLog. Make the ChangesLog from array of bytes.
      Parameters:
      byteArray - the serialized ChangesLog
      Returns:
      TransactionChangesLog return the deserialized ChangesLog
      Throws:
      IOException - will be generated the IOException
      ClassNotFoundException - will be generated the ClassNotFoundException
    • getRandomAccessFile

      public RandomAccessFile getRandomAccessFile(FixupStream fs) throws IOException
      getRandomAccessFile.
      Parameters:
      fs - the FixupStream
      Returns:
      RandomAccessFile return the RandomAccessFile by FixupStream
      Throws:
      IOException - will be generated the IOException
    • addNewStream

      public void addNewStream(FixupStream fs) throws IOException
      addNewStream.
      Parameters:
      fs - the FixupStream
      Throws:
      IOException - will be generated the IOException
    • restore

      public void restore() throws IOException
      Restore ChangesLog(set the InputStreams to ValueData).
      Throws:
      IOException - will be generated the IOException