Class: Synapse::Configuration::IntervalSnapshotPolicyDefinitionBuilder

Inherits:
DefinitionBuilder
  • Object
show all
Defined in:
lib/synapse/configuration/component/event_sourcing/snapshot/interval_policy.rb

Overview

Definition builder used to create an interval-based snapshot policy

Examples:

The minimum possible effort to build a snapshot policy

interval_snapshot_policy

Build an aggregate snapshot taker using an alternate threshold

interval_snapshot_policy :alt_snapshot_policy do
  use_threshold 50
end

Instance Attribute Summary

Attributes inherited from DefinitionBuilder

#id

Instance Method Summary collapse

Methods inherited from DefinitionBuilder

#anonymous, #as_prototype, #as_singleton, build, #build_composite, #build_definition, #clear_tags, #identified_by, #initialize, #register_definition, #replace_tags, #tag, #use_factory, #use_instance

Constructor Details

This class inherits a constructor from Synapse::Configuration::DefinitionBuilder

Instance Method Details

#use_threshold(threshold) ⇒ undefined

Parameters:

  • threshold (Integer)

Returns:

  • (undefined)


15
16
17
# File 'lib/synapse/configuration/component/event_sourcing/snapshot/interval_policy.rb', line 15

def use_threshold(threshold)
  @threshold = threshold
end