Search in sources :

Example 1 with EventModule

use of com.netflix.conductor.core.config.EventModule in project conductor by Netflix.

the class TestModule method configure.

@Override
protected void configure() {
    System.setProperty("workflow.system.task.worker.callback.seconds", "0");
    System.setProperty("workflow.system.task.worker.queue.size", "10000");
    System.setProperty("workflow.system.task.worker.thread.count", "10");
    configureExecutorService();
    MockConfiguration config = new MockConfiguration();
    bind(Configuration.class).toInstance(config);
    install(new LocalRedisModule());
    bind(ShardingStrategy.class).toProvider(RedisQueuesShardingStrategyProvider.class).asEagerSingleton();
    bind(RedisQueues.class).toProvider(RedisQueuesProvider.class);
    bind(MetadataDAO.class).to(RedisMetadataDAO.class);
    bind(ExecutionDAO.class).to(RedisExecutionDAO.class);
    bind(RateLimitingDAO.class).to(RedisRateLimitingDAO.class);
    bind(EventHandlerDAO.class).to(RedisEventHandlerDAO.class);
    bind(PollDataDAO.class).to(RedisPollDataDAO.class);
    bind(IndexDAO.class).to(MockIndexDAO.class);
    configureQueueDAO();
    bind(WorkflowStatusListener.class).to(WorkflowStatusListenerStub.class);
    bind(MetadataService.class).to(MetadataServiceImpl.class);
    install(new CoreModule());
    install(new EventModule());
    bind(UserTask.class).asEagerSingleton();
    bind(ObjectMapper.class).toProvider(JsonMapperProvider.class);
    bind(ExternalPayloadStorage.class).to(MockExternalPayloadStorage.class);
    install(new LocalOnlyLockModule());
}
Also used : PollDataDAO(com.netflix.conductor.dao.PollDataDAO) RedisPollDataDAO(com.netflix.conductor.dao.dynomite.RedisPollDataDAO) Configuration(com.netflix.conductor.core.config.Configuration) RedisQueuesShardingStrategyProvider(com.netflix.conductor.dyno.RedisQueuesShardingStrategyProvider) ExecutionDAO(com.netflix.conductor.dao.ExecutionDAO) RedisExecutionDAO(com.netflix.conductor.dao.dynomite.RedisExecutionDAO) EventModule(com.netflix.conductor.core.config.EventModule) LocalRedisModule(com.netflix.conductor.server.LocalRedisModule) RedisQueues(com.netflix.dyno.queues.redis.RedisQueues) RedisRateLimitingDAO(com.netflix.conductor.dao.dynomite.RedisRateLimitingDAO) RateLimitingDAO(com.netflix.conductor.dao.RateLimitingDAO) IndexDAO(com.netflix.conductor.dao.IndexDAO) MetadataService(com.netflix.conductor.service.MetadataService) LocalOnlyLockModule(com.netflix.conductor.core.utils.LocalOnlyLockModule) WorkflowStatusListener(com.netflix.conductor.core.execution.WorkflowStatusListener) ExternalPayloadStorage(com.netflix.conductor.common.utils.ExternalPayloadStorage) CoreModule(com.netflix.conductor.core.config.CoreModule) RedisEventHandlerDAO(com.netflix.conductor.dao.dynomite.RedisEventHandlerDAO) EventHandlerDAO(com.netflix.conductor.dao.EventHandlerDAO) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) MetadataDAO(com.netflix.conductor.dao.MetadataDAO) RedisMetadataDAO(com.netflix.conductor.dao.dynomite.RedisMetadataDAO)

Example 2 with EventModule

use of com.netflix.conductor.core.config.EventModule in project conductor by Netflix.

the class ServerModule method configure.

@Override
protected void configure() {
    install(new CoreModule());
    install(new ValidationModule());
    install(new ArchaiusModule());
    install(new JettyModule());
    install(new GRPCModule());
    install(new EventModule());
    bindInterceptor(Matchers.any(), Matchers.annotatedWith(Service.class), new ServiceInterceptor(getProvider(Validator.class)));
    bind(Configuration.class).to(SystemPropertiesConfiguration.class).in(Scopes.SINGLETON);
    bind(ExecutorService.class).toProvider(ExecutorServiceProvider.class).in(Scopes.SINGLETON);
    bind(WorkflowSweeper.class).asEagerSingleton();
    bind(WorkflowMonitor.class).asEagerSingleton();
}
Also used : GRPCModule(com.netflix.conductor.grpc.server.GRPCModule) EventModule(com.netflix.conductor.core.config.EventModule) WorkflowSweeper(com.netflix.conductor.core.execution.WorkflowSweeper) ArchaiusModule(com.netflix.archaius.guice.ArchaiusModule) JettyModule(com.netflix.conductor.jetty.server.JettyModule) Service(com.netflix.conductor.annotations.Service) ExecutorService(java.util.concurrent.ExecutorService) ServiceInterceptor(com.netflix.conductor.interceptors.ServiceInterceptor) SystemPropertiesConfiguration(com.netflix.conductor.core.config.SystemPropertiesConfiguration) CoreModule(com.netflix.conductor.core.config.CoreModule) WorkflowMonitor(com.netflix.conductor.service.WorkflowMonitor) ValidationModule(com.netflix.conductor.core.config.ValidationModule)

Example 3 with EventModule

use of com.netflix.conductor.core.config.EventModule in project conductor by Netflix.

the class MySQLTestModule method configure.

@Override
protected void configure() {
    bind(Configuration.class).to(SystemPropertiesMySQLConfiguration.class).in(Singleton.class);
    bind(MySQLConfiguration.class).to(SystemPropertiesMySQLConfiguration.class).in(Singleton.class);
    bind(DataSource.class).toProvider(MySQLDataSourceProvider.class).in(Scopes.SINGLETON);
    bind(MetadataDAO.class).to(MySQLMetadataDAO.class);
    bind(EventHandlerDAO.class).to(MySQLMetadataDAO.class);
    bind(ExecutionDAO.class).to(MySQLExecutionDAO.class);
    bind(RateLimitingDAO.class).to(MySQLExecutionDAO.class);
    bind(PollDataDAO.class).to(MySQLExecutionDAO.class);
    bind(QueueDAO.class).to(MySQLQueueDAO.class);
    bind(IndexDAO.class).to(MockIndexDAO.class);
    bind(WorkflowStatusListener.class).to(WorkflowStatusListenerStub.class);
    install(new CoreModule());
    install(new EventModule());
    bind(UserTask.class).asEagerSingleton();
    bind(ObjectMapper.class).toProvider(JsonMapperProvider.class);
    bind(ExternalPayloadStorage.class).to(MockExternalPayloadStorage.class);
    bind(MetadataService.class).to(MetadataServiceImpl.class);
    install(new NoopLockModule());
}
Also used : PollDataDAO(com.netflix.conductor.dao.PollDataDAO) ExecutionDAO(com.netflix.conductor.dao.ExecutionDAO) MySQLExecutionDAO(com.netflix.conductor.dao.mysql.MySQLExecutionDAO) EventModule(com.netflix.conductor.core.config.EventModule) SystemPropertiesMySQLConfiguration(com.netflix.conductor.mysql.SystemPropertiesMySQLConfiguration) NoopLockModule(com.netflix.conductor.core.utils.NoopLockModule) RateLimitingDAO(com.netflix.conductor.dao.RateLimitingDAO) IndexDAO(com.netflix.conductor.dao.IndexDAO) MetadataService(com.netflix.conductor.service.MetadataService) MySQLQueueDAO(com.netflix.conductor.dao.mysql.MySQLQueueDAO) QueueDAO(com.netflix.conductor.dao.QueueDAO) WorkflowStatusListener(com.netflix.conductor.core.execution.WorkflowStatusListener) MySQLDataSourceProvider(com.netflix.conductor.mysql.MySQLDataSourceProvider) ExternalPayloadStorage(com.netflix.conductor.common.utils.ExternalPayloadStorage) CoreModule(com.netflix.conductor.core.config.CoreModule) EventHandlerDAO(com.netflix.conductor.dao.EventHandlerDAO) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) MySQLMetadataDAO(com.netflix.conductor.dao.mysql.MySQLMetadataDAO) MetadataDAO(com.netflix.conductor.dao.MetadataDAO)

Aggregations

CoreModule (com.netflix.conductor.core.config.CoreModule)3 EventModule (com.netflix.conductor.core.config.EventModule)3 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)2 ExternalPayloadStorage (com.netflix.conductor.common.utils.ExternalPayloadStorage)2 WorkflowStatusListener (com.netflix.conductor.core.execution.WorkflowStatusListener)2 EventHandlerDAO (com.netflix.conductor.dao.EventHandlerDAO)2 ExecutionDAO (com.netflix.conductor.dao.ExecutionDAO)2 IndexDAO (com.netflix.conductor.dao.IndexDAO)2 MetadataDAO (com.netflix.conductor.dao.MetadataDAO)2 PollDataDAO (com.netflix.conductor.dao.PollDataDAO)2 RateLimitingDAO (com.netflix.conductor.dao.RateLimitingDAO)2 MetadataService (com.netflix.conductor.service.MetadataService)2 ArchaiusModule (com.netflix.archaius.guice.ArchaiusModule)1 Service (com.netflix.conductor.annotations.Service)1 Configuration (com.netflix.conductor.core.config.Configuration)1 SystemPropertiesConfiguration (com.netflix.conductor.core.config.SystemPropertiesConfiguration)1 ValidationModule (com.netflix.conductor.core.config.ValidationModule)1 WorkflowSweeper (com.netflix.conductor.core.execution.WorkflowSweeper)1 LocalOnlyLockModule (com.netflix.conductor.core.utils.LocalOnlyLockModule)1 NoopLockModule (com.netflix.conductor.core.utils.NoopLockModule)1