- All Implemented Interfaces:
- JournalContext, Closeable, AutoCloseable, java.util.function.Supplier<JournalContext>
@NotThreadSafe
public final class MergeJournalContext
extends Object
implements JournalContext
Context for merging journal entries together for a wrapped journal context.
This is used so that we can combine several journal entries into one using a merge
function. This prevents partial writes of these journal entries causing system to
be left in an inconsistent state. For example, createFile without completing the file.
This class will only merge the relevant inode entries for a particular URL.
File operations to other URIs will be passed to the underlying JournalContext,
and will not be buffered.
Note that any buffered journal entries are not persisted and they will only be persisted
when close is called on them. Closing the MergeJournalContext will also not close
the enclosed journal context.