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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classPendingChangesLog.TypeThe definition of ChangesLog types.
-
Constructor Summary
Constructors Constructor Description PendingChangesLog(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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNewStream(FixupStream fs)addNewStream.static byte[]getAsByteArray(org.exoplatform.services.jcr.dataflow.TransactionChangesLog dataChangesLog)getAsByteArray.static org.exoplatform.services.jcr.dataflow.TransactionChangesLoggetAsItemDataChangesLog(byte[] byteArray)getAsItemDataChangesLog.intgetConteinerType()getConteinerType.byte[]getData()getData.List<FixupStream>getFixupStreams()getFixupStreams.StringgetIdentifier()getIdentifier.List<InputStream>getInputStreams()getInputStreams.org.exoplatform.services.jcr.dataflow.TransactionChangesLoggetItemDataChangesLog()getItemDataChangesLog.List<org.exoplatform.services.jcr.impl.util.io.SpoolFile>getListFile()getListFile.List<RandomAccessFile>getListRandomAccessFiles()getListRandomAccessFiles.RandomAccessFilegetRandomAccessFile(FixupStream fs)getRandomAccessFile.voidputData(int offset, byte[] tempData)putData.voidrestore()Restore ChangesLog(set the InputStreams to ValueData).
-
-
-
Constructor Detail
-
PendingChangesLog
public PendingChangesLog(org.exoplatform.services.jcr.dataflow.TransactionChangesLog itemDataChangesLog, org.exoplatform.services.jcr.impl.util.io.FileCleaner fileCleaner) throws IOExceptionPendingChangesLog 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 IOExceptionPendingChangesLog constructor.- Parameters:
itemDataChangesLog- ChangesLog with dataidentifier- identifier to this PendingChangesLog.type- type of PendingChangesLogfileCleaner- 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 datalistFixupStreams- list of FixupStreamslistFiles- list of FilesfileCleaner- the FileCleaner
-
-
Method Detail
-
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 IOExceptiongetAsByteArray. 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, ClassNotFoundExceptiongetAsItemDataChangesLog. 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
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 IOExceptionRestore ChangesLog(set the InputStreams to ValueData).- Throws:
IOException- will be generated the IOException
-
-