module Sequent::Core::SnapshotConfiguration::ClassMethods

Attributes

snapshot_default_threshold[R]

Public Instance Methods

enable_snapshots(default_threshold: 20) click to toggle source

Enable snapshots for this aggregate. The aggregate instance must define the load_from_snapshot and save_to_snapshot methods.

# File lib/sequent/core/aggregate_root.rb, line 18
def enable_snapshots(default_threshold: 20)
  @snapshot_default_threshold = default_threshold
end
snapshots_enabled?() click to toggle source
# File lib/sequent/core/aggregate_root.rb, line 22
def snapshots_enabled?
  !snapshot_default_threshold.nil?
end