Yields all domain events in the event store.
420965
def all_domain_events(self):
        
        for originator_id in self.record_manager.all_sequence_ids():
            for domain_event in self.get_domain_events(originator_id=originator_id, page_size=100):
                yield domain_event
995139
def filter_callbacks(cls, client, event_data):
        """"""

        for event in cls.filter_events(client, event_data):
            for cb in event.callbacks:
                yield cb
142899
private function eventsShouldExistInStore(DomainEvent ...$events) {
        $expected = array_map(function (DomainEvent $event) {
            return $this->serializer->serialize($event);
        }, $events);

        $existing = $this->eventStore->getEvents()->map(function(DomainEvent $event) {
            return $this->serializer->serialize($event);
        })->toArray();

        $notFound = array_filter($expected, function($expectedEvent) use ($existing) {
            return ! in_array($expectedEvent, $existing);
        });

        if (empty($notFound)) return;

        throw new FailureException($this->missingEventExceptionMessage($notFound));
    }
27482
function Domain(options) {
  EventEmitter.call(this);

  options = options || {};

  if (!options.domainPath) {
    var err = new Error('Please provide domainPath or domainLoader in options');
    debug(err);
    throw err;
  }

  options.retryOnConcurrencyTimeout = options.retryOnConcurrencyTimeout || 800;

  options.commandRejectedEventName = options.commandRejectedEventName || 'commandRejected';

  options.snapshotThreshold = options.snapshotThreshold || 100;

  options.useLoaderExtensions = options.useLoaderExtensions || false;

  this.structureLoader = createStructureLoader(options.structureLoader);

  this.eventStore = createEventStore(options.eventStore);

  this.aggregateLock = createAggregateLock(options.aggregateLock);

  if (options.deduplication) {
    this.commandBumper = createCommandBumper(options.deduplication);
  }

  this.options = options;

  this.definitions = {
    command: {
      id: 'id',
      name: 'name',
      aggregateId: 'aggregate.id'
//      context: 'context.name',        // optional
//      aggregate: 'aggregate.name',    // optional
//      payload: 'payload',             // optional
//      revision: 'revision',           // optional
//      version: 'version',             // optional
//      meta: 'meta'                    // optional (will be passed directly to corresponding event(s))
    },
    event: {
      correlationId: 'correlationId',
      id: 'id',
      name: 'name',
      aggregateId: 'aggregate.id',
//      context: 'context.name',        // optional
//      aggregate: 'aggregate.name',    // optional
      payload: 'payload',               // optional
      revision: 'revision'              // optional
//      version: 'version',             // optional
//      meta: 'meta'                    // optional (will be passed directly from corresponding command)
    }
  };

  this.idGenerator(function () {
    return uuid().toString();
  });

  this.onEvent(function (evt) {
    debug('emit:', evt);
  });

  this.extendValidator(function (validator) {
    debug('no validator extension defined');
  });
}
230680
def find_all(self, predicate):
        
        for _nid, entry in self._registry.items():
            if predicate(entry):
                yield entry
991839
public function dispatch(DomainEvents $events) : void {
        $events->each(function (DomainEvent $event) {
            $this->listeners->each(function (Listener $listener) use ($event) {
                    $listener->handle($event);
            });
        });
    }
560174
def generate_events_list(generator):
    """"""

    if not localized_events:
        generator.context['events_list'] = sorted(events, reverse = True,
                                                  key=lambda ev: (ev.dtstart, ev.dtend))
    else:
        generator.context['events_list'] = {k: sorted(v, reverse = True,
                                                      key=lambda ev: (ev.dtstart, ev.dtend))
                                            for k, v in localized_events.items()}
422051
protected <T extends DomainEvent> T registerEvent(T event) {
        Assert.notNull(event, "Domain event must not be null!");

        this.domainEvents.add(event);
        return event;
    }
699091
def events(self):
        
        all_events = [{ensure_unicode(key): value for key, value in iteritems(ev)} for ev in self._events]

        for ev in all_events:
            to_decode = []
            for key, value in iteritems(ev):
                if isinstance(value, binary_type) and key != 'host':
                    to_decode.append(key)
            for key in to_decode:
                ev[key] = ensure_unicode(ev[key])

            if ev.get('tags'):
                ev['tags'] = normalize_tags(ev['tags'])

        return all_events
712472
def get_events(params = nil, paging = nil)
      response = @client.get(construct_url(paging), params)
      extract_paging(response)
      response
    end
176331
def detach_events(self, *events):
        """"""
        reg = self.registry
        delete = defaultdict(list)

        # remove from self.events
        all_events = reg.events
        for e in events:
            regexp = getattr(e.regexp, 're', e.regexp)
            iotype = e.iotype
            if e in all_events[iotype].get(regexp, []):
                all_events[iotype][regexp].remove(e)
                if not all_events[iotype][regexp]:
                    del all_events[iotype][regexp]
                    # need to delete from self.events_re
                    delete[iotype].append(regexp)

        # delete from events_re
        for iotype, regexps in delete.items():
            reg.events_re[iotype] = [r for r in reg.events_re[iotype]
                                     if r[0] not in regexps]
1212734
def trigger_all_change_callbacks(self):
        """"""
        return [
            ret
            for key in DatastoreLegacy.store[self.domain].keys()
            for ret in self.trigger_change_callbacks(key)
        ]
366045
def bind_events(self, events):
        '''
        '''
        evs = self._events
        if evs and events:
            for event in evs.values():
                if event.name in events:
                    event.bind(events[event.name])
30239
function Eventstore(options, store) {
  this.options = options || {};
  this.store = store;

  this.eventMappings = {};

  EventEmitter.call(this);
}
1182880
def all
      events = Event.get("/eventlist", :query =>{"id" => @@id , "account" => @@account })
      event_sales = Event.get("/eventsales", :query =>{"id" => @@id , "account" => @@account })
      parsed_event = []
      events.parsed_response["document"]["event"].each do |event|
        parsed_event << Event.new(@id,@account, event)
      end
      return parsed_event
    end
291749
def _events(self):
    """"""
    for did, device in sorted(six.iteritems(self._proto.devices)):
      if device.name:
        yield dict(
            ph=_TYPE_METADATA,
            pid=did,
            name='process_name',
            args=dict(name=device.name))
      yield dict(
          ph=_TYPE_METADATA,
          pid=did,
          name='process_sort_index',
          args=dict(sort_index=did))
      for rid, resource in sorted(six.iteritems(device.resources)):
        if resource.name:
          yield dict(
              ph=_TYPE_METADATA,
              pid=did,
              tid=rid,
              name='thread_name',
              args=dict(name=resource.name))
        yield dict(
            ph=_TYPE_METADATA,
            pid=did,
            tid=rid,
            name='thread_sort_index',
            args=dict(sort_index=rid))
    # TODO(sammccall): filtering and downsampling?
    for event in self._proto.trace_events:
      yield self._event(event)
586041
def events_for_date_range(start_d, end_d, find_options = {})
      self.scoped(find_options).find(
        :all,
        :conditions => [ "(? <= #{self.quoted_table_name}.#{self.end_at_field}) AND (#{self.quoted_table_name}.#{self.start_at_field}< ?)", start_d.to_time.utc, end_d.to_time.utc ],
        :order => "#{self.quoted_table_name}.#{self.start_at_field} ASC"
      )
    end