Class: Synapse::EventSourcing::SnapshotPolicy

Inherits:
Object
  • Object
show all
Defined in:
lib/synapse/event_sourcing/snapshot/policy.rb

Overview

Represents a mechanism for determining if an aggregate should have a snapshot taken

Direct Known Subclasses

IntervalSnapshotPolicy

Instance Method Summary collapse

Instance Method Details

#should_snapshot?(aggregate) ⇒ Boolean

Returns true if a snapshot should be scheduled for the given aggregate

Parameters:

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


9
10
11
# File 'lib/synapse/event_sourcing/snapshot/policy.rb', line 9

def should_snapshot?(aggregate)
  raise NotImplementedError
end