module Sequent::Core::SnapshotConfiguration::ClassMethods
Attributes
Public Instance Methods
Source
# File lib/sequent/core/aggregate_root.rb, line 18 def enable_snapshots(default_threshold: 20) @snapshot_default_threshold = default_threshold end
Enable snapshots for this aggregate. The aggregate instance must define the take_snapshot methods.
Source
# File lib/sequent/core/aggregate_root.rb, line 22 def snapshots_enabled? !snapshot_default_threshold.nil? end