Class StashObjectsWriterImpl
- java.lang.Object
-
- com.atlassian.confluence.impl.backuprestore.restore.stash.StashObjectsWriterImpl
-
- All Implemented Interfaces:
StashObjectsWriter
public class StashObjectsWriterImpl extends Object implements StashObjectsWriter
Implementation of StashObjectsWriter that stores data to the file where each object is stored in the format:- 4 bytes: object length (N)
- N bytes: object itself
- Since:
- 8.1.0
-
-
Constructor Summary
Constructors Constructor Description StashObjectsWriterImpl(StashObjectsSerialiser stashObjectsSerialiser, File file)StashObjectsWriterImpl(StashObjectsSerialiser stashObjectsSerialiser, File file, IOFriendlyFunction<File,FileOutputStream> fileOutputStreamFunction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the stash.longgetNumberOfWrittenObjects()voidwriteObject(ImportedObjectV2 object)Writes an object to the stash.
-
-
-
Constructor Detail
-
StashObjectsWriterImpl
public StashObjectsWriterImpl(StashObjectsSerialiser stashObjectsSerialiser, File file)
-
StashObjectsWriterImpl
public StashObjectsWriterImpl(StashObjectsSerialiser stashObjectsSerialiser, File file, IOFriendlyFunction<File,FileOutputStream> fileOutputStreamFunction)
-
-
Method Detail
-
writeObject
public void writeObject(ImportedObjectV2 object) throws BackupRestoreException
Description copied from interface:StashObjectsWriterWrites an object to the stash.- Specified by:
writeObjectin interfaceStashObjectsWriter- Parameters:
object- object- Throws:
BackupRestoreException
-
getNumberOfWrittenObjects
public long getNumberOfWrittenObjects()
- Specified by:
getNumberOfWrittenObjectsin interfaceStashObjectsWriter- Returns:
- number of written objects.
-
close
public void close() throws BackupRestoreExceptionDescription copied from interface:StashObjectsWriterCloses the stash.- Specified by:
closein interfaceStashObjectsWriter- Throws:
BackupRestoreException
-
-