Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
schananas committed Dec 17, 2021
1 parent 540c5b5 commit 7c6e521
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
import org.axonframework.common.AxonConfigurationException;
import org.axonframework.common.AxonThreadFactory;
import org.axonframework.common.Registration;
import org.axonframework.lifecycle.LifecycleAware;
import org.axonframework.common.StringUtils;
import org.axonframework.lifecycle.LifecycleAware;
import org.axonframework.lifecycle.Phase;
import org.axonframework.lifecycle.ShutdownLatch;
import org.axonframework.messaging.Distributed;
Expand Down Expand Up @@ -471,9 +471,9 @@ public Builder loadFactorProvider(CommandLoadFactorProvider loadFactorProvider)
}

/**
* TODO
* Sets the default context for this event store to connect to.
*
* @param defaultContext
* @param defaultContext for this bus to connect to.
* @return the current Builder instance, for fluent interfacing
*/
public Builder defaultContext(String defaultContext) {
Expand Down Expand Up @@ -513,7 +513,7 @@ protected void validate() throws AxonConfigurationException {
assertNonNull(localSegment, "The Local CommandBus is a hard requirement and should be provided");
assertNonNull(serializer, "The Serializer is a hard requirement and should be provided");
assertNonNull(routingStrategy, "The RoutingStrategy is a hard requirement and should be provided");
//assertNonNull(defaultContext, "The default context is a hard requirement and should be provided");
assertNonNull(defaultContext, "The default context is a hard requirement and should be provided");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public ScheduleToken reschedule(ScheduleToken scheduleToken, Duration triggerDur
}

private EventChannel eventChannel() {
return axonServerConnectionManager.getConnection().eventChannel(); //todo multicontext setup
return axonServerConnectionManager.getConnection().eventChannel();
}

private Event toEvent(Object event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,12 @@ public Builder eventSerializer(Serializer eventSerializer) {
return this;
}

/**
* Sets the default context for this event store to connect to.
*
* @param defaultContext for this event store to connect to.
* @return the current Builder instance, for fluent interfacing
*/
public Builder defaultContext(String defaultContext) {
assertNonNull(defaultContext, "The default context may not be null");
this.defaultContext = defaultContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,16 @@ public EventProcessorInfoConfiguration(
}

/**
* TODO
* Create a default EventProcessorInfoConfiguration, which uses the {@link EventProcessorControlService}
*
* @param eventProcessorControlServiceBuilder TODO
* @param eventProcessorControlService a Function taking in the {@link Configuration} and providing a {@link
* EventProcessorControlService}
*/
public EventProcessorInfoConfiguration(
Function<Configuration, EventProcessorControlService> eventProcessorControlServiceBuilder
Function<Configuration, EventProcessorControlService> eventProcessorControlService
) {
this.eventProcessorControlService = new Component<>(
() -> config, "eventProcessorControlService", eventProcessorControlServiceBuilder
() -> config, "eventProcessorControlService", eventProcessorControlService
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
import org.axonframework.common.AxonException;
import org.axonframework.common.AxonThreadFactory;
import org.axonframework.common.Registration;
import org.axonframework.lifecycle.LifecycleAware;
import org.axonframework.common.StringUtils;
import org.axonframework.lifecycle.LifecycleAware;
import org.axonframework.lifecycle.Phase;
import org.axonframework.lifecycle.ShutdownLatch;
import org.axonframework.messaging.Distributed;
Expand Down Expand Up @@ -632,9 +632,9 @@ public Builder instructionAckSource(InstructionAckSource<QueryProviderOutbound>
}

/**
* TODO
* Sets the default context for this event store to connect to.
*
* @param defaultContext
* @param defaultContext for this bus to connect to.
* @return the current Builder instance, for fluent interfacing
*/
public Builder defaultContext(String defaultContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -800,13 +800,6 @@ protected EventProcessor subscribingEventProcessor(String name,
.build();
}

/**
* @param name
* @param eventHandlerInvoker
* @param config
* @param source
* @return
*/
protected EventProcessor trackingEventProcessor(String name,
EventHandlerInvoker eventHandlerInvoker,
TrackingEventProcessorConfiguration config,
Expand All @@ -824,14 +817,6 @@ protected EventProcessor trackingEventProcessor(String name,
.build();
}

/**
* @param name
* @param eventHandlerInvoker
* @param config
* @param messageSource
* @param processorConfiguration
* @return
*/
protected EventProcessor pooledStreamingEventProcessor(
String name,
EventHandlerInvoker eventHandlerInvoker,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,5 @@ public EventStore eventStore(AxonServerConfiguration axonServerConfiguration,
.upcasterChain(configuration.upcasterChain())
.build();
}

// @Bean todo
// @ConditionalOnMissingBean
// public EventScheduler eventScheduler(@Qualifier("eventSerializer") Serializer eventSerializer,
// AxonServerConnectionManager connectionManager) {
// return AxonServerEventScheduler.builder()
// .eventSerializer(eventSerializer)
// .connectionManager(connectionManager)
// .build();
// }
}

0 comments on commit 7c6e521

Please sign in to comment.