@Test void testCanResolveReturnsTrueForMatchingAggregateDescriptor() { Repository<StubAggregate> testRepository = testSubject.createRepository(mockEventStore, new GenericAggregateFactory<>(StubAggregate.class), snapshotTriggerDefinition, ClasspathParameterResolverFactory.forClass(StubAggregate.class)); assertTrue(testRepository.canResolve(new AggregateScopeDescriptor( StubAggregate.class.getSimpleName(), "some-identifier") )); }
@SuppressWarnings("unchecked") public <T> Repository<T> createRepository(EventStore eventStore, AggregateFactory<T> aggregateFactory, SnapshotTriggerDefinition snapshotTriggerDefinition, ParameterResolverFactory parameterResolverFactory) { return createRepository(eventStore, null, aggregateFactory, snapshotTriggerDefinition, parameterResolverFactory, ClasspathHandlerDefinition.forClass(aggregateFactory.getAggregateType())); }
CommandHandlerInvoker implements EventHandler<CommandHandlingEntry>, LifecycleAware { @SuppressWarnings("unchecked") public <T> Repository<T> createRepository(EventStore eventStore, AggregateFactory<T> aggregateFactory, SnapshotTriggerDefinition snapshotTriggerDefinition, ParameterResolverFactory parameterResolverFactory) { return createRepository(eventStore, null, aggregateFactory, snapshotTriggerDefinition, parameterResolverFactory, ClasspathHandlerDefinition.forClass(aggregateFactory.getAggregateType())); } }
CommandHandlerInvoker implements EventHandler<CommandHandlingEntry>, LifecycleAware { @SuppressWarnings("unchecked") public <T> Repository<T> createRepository(EventStore eventStore, AggregateFactory<T> aggregateFactory, SnapshotTriggerDefinition snapshotTriggerDefinition, ParameterResolverFactory parameterResolverFactory) { return createRepository(eventStore, null, aggregateFactory, snapshotTriggerDefinition, parameterResolverFactory, ClasspathHandlerDefinition.forClass(aggregateFactory.getAggregateType())); } CommandHandlerInvoker(Cache cache, int segmentId); }
CommandHandlerInvoker implements EventHandler<CommandHandlingEntry>, LifecycleAware { @SuppressWarnings("unchecked") public <T> Repository<T> createRepository(EventStore eventStore, AggregateFactory<T> aggregateFactory, SnapshotTriggerDefinition snapshotTriggerDefinition, ParameterResolverFactory parameterResolverFactory) { return createRepository(eventStore, null, aggregateFactory, snapshotTriggerDefinition, parameterResolverFactory, ClasspathHandlerDefinition.forClass(aggregateFactory.getAggregateType())); } CommandHandlerInvoker(Cache cache, int segmentId); @SuppressWarnings("unchecked") static DisruptorRepository<T> getRepository(Class<?> type); @Override void onEvent(CommandHandlingEntry entry, long sequence, boolean endOfBatch); @SuppressWarnings("unchecked") Repository<T> createRepository(EventStore eventStore,
                                              AggregateFactory<T> aggregateFactory,
                                              SnapshotTriggerDefinition snapshotTriggerDefinition,
                                              ParameterResolverFactory parameterResolverFactory); @SuppressWarnings("unchecked") Repository<T> createRepository(EventStore eventStore,
                                              RepositoryProvider repositoryProvider,
                                              AggregateFactory<T> aggregateFactory,
                                              SnapshotTriggerDefinition snapshotTriggerDefinition,
                                              ParameterResolverFactory parameterResolverFactory,
                                              HandlerDefinition handlerDefinition); @Override void onStart(); @Override void onShutdown(); }
CommandHandlerInvoker implements EventHandler<CommandHandlingEntry>, LifecycleAware { @SuppressWarnings("unchecked") public <T> Repository<T> createRepository(EventStore eventStore, AggregateFactory<T> aggregateFactory, SnapshotTriggerDefinition snapshotTriggerDefinition, ParameterResolverFactory parameterResolverFactory) { return createRepository(eventStore, null, aggregateFactory, snapshotTriggerDefinition, parameterResolverFactory, ClasspathHandlerDefinition.forClass(aggregateFactory.getAggregateType())); } CommandHandlerInvoker(Cache cache, int segmentId); @SuppressWarnings("unchecked") static DisruptorRepository<T> getRepository(Class<?> type); @Override void onEvent(CommandHandlingEntry entry, long sequence, boolean endOfBatch); @SuppressWarnings("unchecked") Repository<T> createRepository(EventStore eventStore,
                                              AggregateFactory<T> aggregateFactory,
                                              SnapshotTriggerDefinition snapshotTriggerDefinition,
                                              ParameterResolverFactory parameterResolverFactory); @SuppressWarnings("unchecked") Repository<T> createRepository(EventStore eventStore,
                                              RepositoryProvider repositoryProvider,
                                              AggregateFactory<T> aggregateFactory,
                                              SnapshotTriggerDefinition snapshotTriggerDefinition,
                                              ParameterResolverFactory parameterResolverFactory,
                                              HandlerDefinition handlerDefinition); @Override void onStart(); @Override void onShutdown();  }