Package com.ultikits.ultitools.abstracts
Class AbstractConfigEntity.PanelWrite
java.lang.Object
com.ultikits.ultitools.abstracts.AbstractConfigEntity.PanelWrite
- Enclosing class:
AbstractConfigEntity
Narrow manager coordination for one staged entity; not a module transaction API.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AbstractConfigEntity.PanelCheckpointprivate final List<AbstractConfigEntity.ModuleChange> private OperatorFileWriter.Resultprivate final OperatorFileWriter.Stagedprivate final Path -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePanelWrite(AbstractConfigEntity.PanelCheckpoint before, List<AbstractConfigEntity.ModuleChange> changes, Path target, OperatorFileWriter.Staged staged, Map<Field, Object> bound) -
Method Summary
Modifier and TypeMethodDescriptionvoidAcknowledges only after every manager-owned replacement succeeds.voidcommit()Publishes this file through the configuration write gate only while it still holds exactly the bytes the write was verified against; a file the operator saved after staging is kept and refused.voiddiscard()Releases a staged file that has not been committed.voidrollback()Restores a target this write replaced to exactly the bytes it was verified against - through the gate's last-moment check, so a file the operator saved after this write replaced it is kept and named once (OperatorFileWriter.Staged.restore(), 17-65 review round 1 R65-I3) - and all entity state; always discards its staged file.
-
Field Details
-
before
-
changes
-
target
-
staged
-
committed
-
bound
-
-
Constructor Details
-
PanelWrite
private PanelWrite(AbstractConfigEntity.PanelCheckpoint before, List<AbstractConfigEntity.ModuleChange> changes, Path target, OperatorFileWriter.Staged staged, Map<Field, Object> bound)
-
-
Method Details
-
commit
Publishes this file through the configuration write gate only while it still holds exactly the bytes the write was verified against; a file the operator saved after staging is kept and refused.- Throws:
IOException- if the replacement fails, orConfigWriteRefusedExceptionwhen the file changed since it was staged (nothing was moved)
-
acknowledge
public void acknowledge()Acknowledges only after every manager-owned replacement succeeds. -
rollback
Restores a target this write replaced to exactly the bytes it was verified against - through the gate's last-moment check, so a file the operator saved after this write replaced it is kept and named once (OperatorFileWriter.Staged.restore(), 17-65 review round 1 R65-I3) - and all entity state; always discards its staged file.- Throws:
IOException- if physical recovery fails
-
discard
public void discard()Releases a staged file that has not been committed.
-