Class StashObjectsWriterImpl
java.lang.Object
com.atlassian.confluence.impl.backuprestore.restore.stash.StashObjectsWriterImpl
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionStashObjectsWriterImpl
(StashObjectsSerialiser stashObjectsSerialiser, File file) StashObjectsWriterImpl
(StashObjectsSerialiser stashObjectsSerialiser, File file, IOFriendlyFunction<File, FileOutputStream> fileOutputStreamFunction) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the stash.long
void
writeObject
(ImportedObjectV2 object) Writes an object to the stash.
-
Constructor Details
-
StashObjectsWriterImpl
-
StashObjectsWriterImpl
public StashObjectsWriterImpl(StashObjectsSerialiser stashObjectsSerialiser, File file, IOFriendlyFunction<File, FileOutputStream> fileOutputStreamFunction)
-
-
Method Details
-
writeObject
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
Description copied from interface:StashObjectsWriter
Closes the stash.- Specified by:
close
in interfaceStashObjectsWriter
- Throws:
BackupRestoreException
-