Interface CommitContext
- All Known Implementing Classes:
SimpleCommitContext
public interface CommitContext
A CommitContext instance can be obtained from
CommitInfo.getInfo()
if it has been set before the merge call. This can then be used by CommitHook
to record some metadata regarding the commit.
CommitContext state would be reset in case commit is retried from within NodeStore say when a merge exception occurs.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName of the entry of the mutable commit attributes map in theinfomap inCommitInfo.getInfo() -
Method Summary
Modifier and TypeMethodDescription@Nullable ObjectReturns the value of the named attribute as anObject, ornullif no attribute of the given name exists.voidRemoves an attribute from this commit.voidStores an attribute related to this commit.
-
Field Details
-
NAME
Name of the entry of the mutable commit attributes map in theinfomap inCommitInfo.getInfo()- See Also:
-
-
Method Details
-
set
Stores an attribute related to this commit. Attributes are reset if the commit is retried.If the object passed in is null, the effect is the same as calling
remove(java.lang.String).- Parameters:
name- aStringspecifying the name of the attributevalue- theObjectto be stored
-
get
Returns the value of the named attribute as anObject, ornullif no attribute of the given name exists.- Parameters:
name-Stringspecifying the name of the attribute- Returns:
- an
Objectcontaining the value of the attribute, ornullif the attribute does not exist
-
remove
Removes an attribute from this commit.- Parameters:
name- aStringspecifying the name of the attribute to remove
-