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 void
close()
Closes the stash.long
getNumberOfWrittenObjects()
void
writeObject(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:StashObjectsWriter
Writes an object to the stash.- Specified by:
writeObject
in interfaceStashObjectsWriter
- Parameters:
object
- object- Throws:
BackupRestoreException
-
getNumberOfWrittenObjects
public long getNumberOfWrittenObjects()
- Specified by:
getNumberOfWrittenObjects
in interfaceStashObjectsWriter
- Returns:
- number of written objects.
-
close
public void close() throws BackupRestoreException
Description copied from interface:StashObjectsWriter
Closes the stash.- Specified by:
close
in interfaceStashObjectsWriter
- Throws:
BackupRestoreException
-
-