class Synapse::Configuration::IntervalSnapshotPolicyDefinitionBuilder
Definition
builder used to create an interval-based snapshot policy
@example The minimum possible effort to build a snapshot policy
interval_snapshot_policy
@example Build an aggregate snapshot taker using an alternate threshold
interval_snapshot_policy :alt_snapshot_policy do use_threshold 50 end
Public Instance Methods
use_threshold(threshold)
click to toggle source
@param [Integer] threshold @return [undefined]
# File lib/synapse/configuration/component/event_sourcing/snapshot/interval_policy.rb, line 15 def use_threshold(threshold) @threshold = threshold end
Protected Instance Methods
populate_defaults()
click to toggle source
@return [undefined]
# File lib/synapse/configuration/component/event_sourcing/snapshot/interval_policy.rb, line 22 def populate_defaults identified_by :snapshot_policy use_threshold 30 use_factory do EventSourcing::IntervalSnapshotPolicy.new @threshold end end