Interface TransactionJournal.MutableEntry
- All Superinterfaces:
AutoCloseable
- Enclosing interface:
TransactionJournal
Represents a mutable journal entry. This allows for writes to
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyChangeToResourceContents
(ResourceId resourceId) Logs the suppliedResourceId
as its contents having been flushed.void
applyChangeToResourceReversePaths
(ResourceId resourceId) Logs the suppliedResourceId
as having been flushed.void
Logs the suppliedPath
as having been flushed.void
applyChangeToTasks
(ResourceId resourceId) Applies the changes to the tasks for the suppliedResourceId
.void
close()
Closes this entry.void
commit()
Commits the pending changes to theTransactionJournal
.Gets the unique ID of the transaction.void
rollback()
Rolls back the pending changes to theTransactionJournal
.
-
Method Details
-
getTransactionId
String getTransactionId()Gets the unique ID of the transaction.- Returns:
- the transaction ID
-
commit
void commit()Commits the pending changes to theTransactionJournal
. Once this is done the next subsequent operation must be to close theTransactionJournal.MutableEntry
as it will accept no further mutations. If left uncommitted at close time, the changes to the journal will roll back and result in an error in the logs. -
rollback
void rollback()Rolls back the pending changes to theTransactionJournal
. Once this is done the next subsequent operation must be to close theTransactionJournal.MutableEntry
as it will accept no further mutations. -
applyChangeToResourceReversePaths
Logs the suppliedPath
as having been flushed.- Parameters:
path
-
-
applyChangeToResourceReversePaths
Logs the suppliedResourceId
as having been flushed.- Parameters:
resourceId
-
-
applyChangeToResourceContents
Logs the suppliedResourceId
as its contents having been flushed.- Parameters:
resourceId
-
-
applyChangeToTasks
Applies the changes to the tasks for the suppliedResourceId
.- Parameters:
resourceId
-
-
close
void close()Closes this entry. Releasing any resources to the underlyingTransactionJournal
. Once this is called, all other methods must throw an instance ofIllegalStateException
and commit no changes to the underlyingTransactionJournal
.- Specified by:
close
in interfaceAutoCloseable
-