Class: Petra::Components::Entries::ReadIntegrityOverride
- Defined in:
- lib/petra/components/entries/read_integrity_override.rb
Overview
Tells the system not to raise further ReadIntegrityErrors for the given attribute as long as the external value stays the same.
Instance Attribute Summary
Attributes inherited from LogEntry
#attribute, #object_class, #object_persisted, #persist_on_retry, #section, #transaction_persisted
Class Method Summary collapse
Instance Method Summary collapse
- #apply! ⇒ Object
-
#persist? ⇒ Boolean
ReadIntegrityOverrides always have to be persisted: They are only generated if an exception (ReadIntegrityError, etc) happened which in most cases (except for a rescue within the transaction proc itself) means that its execution stopped and the only thing left is persisting the transaction.
- #persist_on_retry? ⇒ Boolean
Methods inherited from LogEntry
#<=>, #attribute_change?, #attribute_read?, #enqueue_for_persisting!, #for_object?, from_hash, #initialize, #kind?, #load_proxy, log!, #mark_as_object_persisted!, #mark_as_persisted!, #marked_for_destruction?, #object_initialization?, #object_persistence?, #to_h, #to_s, #undo!
Methods included from Util::FieldAccessors
Methods included from Util::Registrable
Constructor Details
This class inherits a constructor from Petra::Components::LogEntry
Class Method Details
.kind ⇒ Object
16 17 18 |
# File 'lib/petra/components/entries/read_integrity_override.rb', line 16 def self.kind :read_integrity_override end |
Instance Method Details
#apply! ⇒ Object
36 |
# File 'lib/petra/components/entries/read_integrity_override.rb', line 36 def apply!; end |
#persist? ⇒ Boolean
ReadIntegrityOverrides always have to be persisted: They are only generated if an exception (ReadIntegrityError, etc) happened which in most cases (except for a rescue within the transaction proc itself) means that its execution stopped and the only thing left is persisting the transaction. Therefore, this log entry will most likely be the last one in the current section and would be lost if we wouldn’t persist it.
28 29 30 |
# File 'lib/petra/components/entries/read_integrity_override.rb', line 28 def persist? true end |
#persist_on_retry? ⇒ Boolean
32 33 34 |
# File 'lib/petra/components/entries/read_integrity_override.rb', line 32 def persist_on_retry? true end |