Search in sources :

Example 1 with ResponsePacker

use of org.neo4j.com.storecopy.ResponsePacker in project neo4j by neo4j.

the class BackupImpl method fullBackup.

@Override
public Response<Void> fullBackup(StoreWriter writer, boolean forensics) {
    try (StoreWriter storeWriter = writer) {
        logger.log("Full backup started...");
        RequestContext copyStartContext = storeCopyServer.flushStoresAndStreamStoreFiles(FULL_BACKUP_CHECKPOINT_TRIGGER, storeWriter, forensics);
        ResponsePacker responsePacker = new StoreCopyResponsePacker(logicalTransactionStore, transactionIdStore, logFileInformation, storeId, copyStartContext.lastAppliedTransaction() + 1, // mandatory transaction id
        storeCopyServer.monitor());
        long optionalTransactionId = copyStartContext.lastAppliedTransaction();
        return responsePacker.packTransactionStreamResponse(anonymous(optionalTransactionId), null);
    } finally {
        logger.log("Full backup finished.");
    }
}
Also used : StoreWriter(org.neo4j.com.storecopy.StoreWriter) ResponsePacker(org.neo4j.com.storecopy.ResponsePacker) RequestContext(org.neo4j.com.RequestContext)

Aggregations

RequestContext (org.neo4j.com.RequestContext)1 ResponsePacker (org.neo4j.com.storecopy.ResponsePacker)1 StoreWriter (org.neo4j.com.storecopy.StoreWriter)1