Interface TransactionJournal.MutableEntry
- All Superinterfaces:
AutoCloseable
- Enclosing interface:
TransactionJournal
Represents a mutable journal entry. This allows for writes to
-
Method Summary
Modifier and TypeMethodDescriptionvoidapplyChangeToResourceContents(ResourceId resourceId) Logs the suppliedResourceIdas its contents having been flushed.voidapplyChangeToResourceReversePaths(ResourceId resourceId) Logs the suppliedResourceIdas having been flushed.voidLogs the suppliedPathas having been flushed.voidapplyChangeToTasks(ResourceId resourceId) Applies the changes to the tasks for the suppliedResourceId.voidclose()Closes this entry.voidcommit()Commits the pending changes to theTransactionJournal.Gets the unique ID of the transaction.voidrollback()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.MutableEntryas 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.MutableEntryas it will accept no further mutations. -
applyChangeToResourceReversePaths
Logs the suppliedPathas having been flushed.- Parameters:
path-
-
applyChangeToResourceReversePaths
Logs the suppliedResourceIdas having been flushed.- Parameters:
resourceId-
-
applyChangeToResourceContents
Logs the suppliedResourceIdas 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 ofIllegalStateExceptionand commit no changes to the underlyingTransactionJournal.- Specified by:
closein interfaceAutoCloseable
-