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 TypeMethodDescriptionvoidclose()Closes the stash.longvoidwriteObject(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: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
Description copied from interface:StashObjectsWriterCloses the stash.- Specified by:
closein interfaceStashObjectsWriter- Throws:
BackupRestoreException
-