Class PendingChangesLog
java.lang.Object
org.exoplatform.services.jcr.ext.backup.impl.PendingChangesLog
Created by The eXo Platform SAS.
- Version:
- $Id: PendingChangesLog.java 31768 2009-05-14 09:35:43Z pnedonosko $
- Author:
- Alex Reshetnyak
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal classThe definition of ChangesLog types. -
Constructor Summary
ConstructorsConstructorDescriptionPendingChangesLog(String identifier, int dataLength) PendingChangesLog constructor.PendingChangesLog(org.exoplatform.services.jcr.dataflow.TransactionChangesLog itemDataChangesLog, String identifier, int type, org.exoplatform.services.jcr.impl.util.io.FileCleaner fileCleaner) PendingChangesLog constructor.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.PendingChangesLog(org.exoplatform.services.jcr.dataflow.TransactionChangesLog itemDataChangesLog, org.exoplatform.services.jcr.impl.util.io.FileCleaner fileCleaner) PendingChangesLog constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNewStream.static byte[]getAsByteArray(org.exoplatform.services.jcr.dataflow.TransactionChangesLog dataChangesLog) getAsByteArray.static org.exoplatform.services.jcr.dataflow.TransactionChangesLoggetAsItemDataChangesLog(byte[] byteArray) getAsItemDataChangesLog.intgetConteinerType.byte[]getData()getData.getFixupStreams.getIdentifier.getInputStreams.org.exoplatform.services.jcr.dataflow.TransactionChangesLoggetItemDataChangesLog.List<org.exoplatform.services.jcr.impl.util.io.SpoolFile> getListFile.getListRandomAccessFiles.getRandomAccessFile.voidputData(int offset, byte[] tempData) putData.voidrestore()Restore ChangesLog(set the InputStreams to ValueData).
-
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 datafileCleaner- 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 dataidentifier- identifier to this PendingChangesLog.type- type of PendingChangesLogfileCleaner- the FileCleaner- Throws:
IOException- will be generated the IOExaption
-
PendingChangesLog
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 datalistFixupStreams- list of FixupStreamslistFiles- list of FilesfileCleaner- 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
getInputStreams.- Returns:
- List return the list of input streams
-
getListRandomAccessFiles
getListRandomAccessFiles.- Returns:
- List return the list of RandomAccessFiles
-
getListFile
getListFile.- Returns:
- List return list of Files
-
getFixupStreams
getFixupStreams.- Returns:
- List return list of FixupStreams
-
getConteinerType
public int getConteinerType()getConteinerType.- Returns:
- int return the type of ChangesLog
-
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 IOExceptionClassNotFoundException- will be generated the ClassNotFoundException
-
getRandomAccessFile
getRandomAccessFile.- Parameters:
fs- the FixupStream- Returns:
- RandomAccessFile return the RandomAccessFile by FixupStream
- Throws:
IOException- will be generated the IOException
-
addNewStream
addNewStream.- Parameters:
fs- the FixupStream- Throws:
IOException- will be generated the IOException
-
restore
Restore ChangesLog(set the InputStreams to ValueData).- Throws:
IOException- will be generated the IOException
-