Class CommonConfiguration


  • @Configuration
    public class CommonConfiguration
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.time.Clock clock()  
      pl.allegro.tech.hermes.common.di.factories.CuratorClientFactory curatorClientFactory​(pl.allegro.tech.hermes.common.config.ConfigFactory configFactory)  
      pl.allegro.tech.hermes.common.message.wrapper.DeserializationMetrics deserializationMetrics​(com.codahale.metrics.MetricRegistry metricRegistry)  
      pl.allegro.tech.hermes.domain.group.GroupRepository groupRepository​(org.apache.curator.framework.CuratorFramework zookeeper, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths, com.fasterxml.jackson.databind.ObjectMapper mapper)  
      org.apache.curator.framework.CuratorFramework hermesCurator​(pl.allegro.tech.hermes.common.config.ConfigFactory configFactory, pl.allegro.tech.hermes.common.di.factories.CuratorClientFactory curatorClientFactory)  
      pl.allegro.tech.hermes.common.metric.HermesMetrics hermesMetrics​(com.codahale.metrics.MetricRegistry metricRegistry, pl.allegro.tech.hermes.metrics.PathsCompiler pathCompiler)  
      pl.allegro.tech.hermes.common.util.InstanceIdResolver instanceIdResolver()  
      pl.allegro.tech.hermes.common.metric.executor.InstrumentedExecutorServiceFactory instrumentedExecutorServiceFactory​(pl.allegro.tech.hermes.common.metric.HermesMetrics hermesMetrics)  
      pl.allegro.tech.hermes.common.message.wrapper.MessageContentWrapper messageContentWrapper​(pl.allegro.tech.hermes.common.config.ConfigFactory config, com.fasterxml.jackson.databind.ObjectMapper mapper, java.time.Clock clock, pl.allegro.tech.hermes.schema.SchemaRepository schemaRepository, pl.allegro.tech.hermes.common.message.wrapper.DeserializationMetrics deserializationMetrics, pl.allegro.tech.hermes.common.config.ConfigFactory configFactory, pl.allegro.tech.hermes.common.message.wrapper.SchemaOnlineChecksRateLimiter schemaOnlineChecksRateLimiter)  
      com.codahale.metrics.MetricRegistry metricRegistry​(pl.allegro.tech.hermes.common.config.ConfigFactory configFactory, pl.allegro.tech.hermes.common.metric.counter.CounterStorage counterStorage, pl.allegro.tech.hermes.common.util.InstanceIdResolver instanceIdResolver, java.lang.String moduleName)  
      pl.allegro.tech.hermes.infrastructure.zookeeper.cache.ModelAwareZookeeperNotifyingCache modelAwareZookeeperNotifyingCache​(org.apache.curator.framework.CuratorFramework curator, pl.allegro.tech.hermes.common.config.ConfigFactory config)  
      java.lang.String moduleName()  
      pl.allegro.tech.hermes.domain.oauth.OAuthProviderRepository oAuthProviderRepository​(org.apache.curator.framework.CuratorFramework zookeeper, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths, com.fasterxml.jackson.databind.ObjectMapper mapper)  
      com.fasterxml.jackson.databind.ObjectMapper objectMapper​(pl.allegro.tech.hermes.common.config.ConfigFactory configFactory)  
      pl.allegro.tech.hermes.metrics.PathsCompiler pathsCompiler​(pl.allegro.tech.hermes.common.util.InstanceIdResolver instanceIdResolver)  
      pl.allegro.tech.hermes.common.config.ConfigFactory prodConfigFactory()  
      pl.allegro.tech.hermes.common.kafka.KafkaNamesMapper prodKafkaNamesMapper​(pl.allegro.tech.hermes.common.config.ConfigFactory configFactory)  
      pl.allegro.tech.hermes.common.message.wrapper.SchemaOnlineChecksRateLimiter schemaOnlineChecksWaitingRateLimiter​(pl.allegro.tech.hermes.common.config.ConfigFactory configFactory)  
      pl.allegro.tech.hermes.infrastructure.zookeeper.counter.SharedCounter sharedCounter​(org.apache.curator.framework.CuratorFramework zookeeper, pl.allegro.tech.hermes.common.config.ConfigFactory config)  
      pl.allegro.tech.hermes.common.kafka.offset.SubscriptionOffsetChangeIndicator subscriptionOffsetChangeIndicatorFactory​(org.apache.curator.framework.CuratorFramework zookeeper, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths, pl.allegro.tech.hermes.domain.subscription.SubscriptionRepository subscriptionRepository)  
      pl.allegro.tech.hermes.domain.subscription.SubscriptionRepository subscriptionRepository​(org.apache.curator.framework.CuratorFramework zookeeper, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths, com.fasterxml.jackson.databind.ObjectMapper mapper, pl.allegro.tech.hermes.domain.topic.TopicRepository topicRepository)  
      pl.allegro.tech.hermes.domain.topic.TopicRepository topicRepository​(org.apache.curator.framework.CuratorFramework zookeeper, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths, com.fasterxml.jackson.databind.ObjectMapper mapper, pl.allegro.tech.hermes.domain.group.GroupRepository groupRepository)  
      pl.allegro.tech.hermes.common.message.undelivered.UndeliveredMessageLog undeliveredMessageLog​(org.apache.curator.framework.CuratorFramework zookeeper, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths, com.fasterxml.jackson.databind.ObjectMapper mapper)  
      pl.allegro.tech.hermes.domain.workload.constraints.WorkloadConstraintsRepository workloadConstraintsRepository​(org.apache.curator.framework.CuratorFramework curator, com.fasterxml.jackson.databind.ObjectMapper mapper, pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths)  
      pl.allegro.tech.hermes.common.admin.zookeeper.ZookeeperAdminCache zookeeperAdminCache​(pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths zookeeperPaths, org.apache.curator.framework.CuratorFramework client, com.fasterxml.jackson.databind.ObjectMapper objectMapper, java.time.Clock clock)  
      pl.allegro.tech.hermes.common.metric.counter.CounterStorage zookeeperCounterStorage​(pl.allegro.tech.hermes.infrastructure.zookeeper.counter.SharedCounter sharedCounter, pl.allegro.tech.hermes.domain.subscription.SubscriptionRepository subscriptionRepository, pl.allegro.tech.hermes.metrics.PathsCompiler pathsCompiler, pl.allegro.tech.hermes.common.config.ConfigFactory configFactory)  
      pl.allegro.tech.hermes.domain.notifications.InternalNotificationsBus zookeeperInternalNotificationBus​(com.fasterxml.jackson.databind.ObjectMapper objectMapper, pl.allegro.tech.hermes.infrastructure.zookeeper.cache.ModelAwareZookeeperNotifyingCache modelNotifyingCache)  
      pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths zookeeperPaths​(pl.allegro.tech.hermes.common.config.ConfigFactory configFactory)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CommonConfiguration

        public CommonConfiguration()
    • Method Detail

      • subscriptionRepository

        @Bean
        public pl.allegro.tech.hermes.domain.subscription.SubscriptionRepository subscriptionRepository​(org.apache.curator.framework.CuratorFramework zookeeper,
                                                                                                        pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths,
                                                                                                        com.fasterxml.jackson.databind.ObjectMapper mapper,
                                                                                                        pl.allegro.tech.hermes.domain.topic.TopicRepository topicRepository)
      • oAuthProviderRepository

        @Bean
        public pl.allegro.tech.hermes.domain.oauth.OAuthProviderRepository oAuthProviderRepository​(org.apache.curator.framework.CuratorFramework zookeeper,
                                                                                                   pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths,
                                                                                                   com.fasterxml.jackson.databind.ObjectMapper mapper)
      • topicRepository

        @Bean
        public pl.allegro.tech.hermes.domain.topic.TopicRepository topicRepository​(org.apache.curator.framework.CuratorFramework zookeeper,
                                                                                   pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths,
                                                                                   com.fasterxml.jackson.databind.ObjectMapper mapper,
                                                                                   pl.allegro.tech.hermes.domain.group.GroupRepository groupRepository)
      • groupRepository

        @Bean
        public pl.allegro.tech.hermes.domain.group.GroupRepository groupRepository​(org.apache.curator.framework.CuratorFramework zookeeper,
                                                                                   pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths,
                                                                                   com.fasterxml.jackson.databind.ObjectMapper mapper)
      • hermesCurator

        @Bean(destroyMethod="close")
        public org.apache.curator.framework.CuratorFramework hermesCurator​(pl.allegro.tech.hermes.common.config.ConfigFactory configFactory,
                                                                           pl.allegro.tech.hermes.common.di.factories.CuratorClientFactory curatorClientFactory)
      • curatorClientFactory

        @Bean
        public pl.allegro.tech.hermes.common.di.factories.CuratorClientFactory curatorClientFactory​(pl.allegro.tech.hermes.common.config.ConfigFactory configFactory)
      • zookeeperInternalNotificationBus

        @Bean
        public pl.allegro.tech.hermes.domain.notifications.InternalNotificationsBus zookeeperInternalNotificationBus​(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
                                                                                                                     pl.allegro.tech.hermes.infrastructure.zookeeper.cache.ModelAwareZookeeperNotifyingCache modelNotifyingCache)
      • modelAwareZookeeperNotifyingCache

        @Bean(destroyMethod="stop")
        public pl.allegro.tech.hermes.infrastructure.zookeeper.cache.ModelAwareZookeeperNotifyingCache modelAwareZookeeperNotifyingCache​(org.apache.curator.framework.CuratorFramework curator,
                                                                                                                                         pl.allegro.tech.hermes.common.config.ConfigFactory config)
      • undeliveredMessageLog

        @Bean
        public pl.allegro.tech.hermes.common.message.undelivered.UndeliveredMessageLog undeliveredMessageLog​(org.apache.curator.framework.CuratorFramework zookeeper,
                                                                                                             pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths,
                                                                                                             com.fasterxml.jackson.databind.ObjectMapper mapper)
      • instrumentedExecutorServiceFactory

        @Bean
        public pl.allegro.tech.hermes.common.metric.executor.InstrumentedExecutorServiceFactory instrumentedExecutorServiceFactory​(pl.allegro.tech.hermes.common.metric.HermesMetrics hermesMetrics)
      • zookeeperAdminCache

        @Bean
        public pl.allegro.tech.hermes.common.admin.zookeeper.ZookeeperAdminCache zookeeperAdminCache​(pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths zookeeperPaths,
                                                                                                     org.apache.curator.framework.CuratorFramework client,
                                                                                                     com.fasterxml.jackson.databind.ObjectMapper objectMapper,
                                                                                                     java.time.Clock clock)
      • objectMapper

        @Bean
        public com.fasterxml.jackson.databind.ObjectMapper objectMapper​(pl.allegro.tech.hermes.common.config.ConfigFactory configFactory)
      • messageContentWrapper

        @Bean
        public pl.allegro.tech.hermes.common.message.wrapper.MessageContentWrapper messageContentWrapper​(pl.allegro.tech.hermes.common.config.ConfigFactory config,
                                                                                                         com.fasterxml.jackson.databind.ObjectMapper mapper,
                                                                                                         java.time.Clock clock,
                                                                                                         pl.allegro.tech.hermes.schema.SchemaRepository schemaRepository,
                                                                                                         pl.allegro.tech.hermes.common.message.wrapper.DeserializationMetrics deserializationMetrics,
                                                                                                         pl.allegro.tech.hermes.common.config.ConfigFactory configFactory,
                                                                                                         pl.allegro.tech.hermes.common.message.wrapper.SchemaOnlineChecksRateLimiter schemaOnlineChecksRateLimiter)
      • deserializationMetrics

        @Bean
        public pl.allegro.tech.hermes.common.message.wrapper.DeserializationMetrics deserializationMetrics​(com.codahale.metrics.MetricRegistry metricRegistry)
      • schemaOnlineChecksWaitingRateLimiter

        @Bean
        public pl.allegro.tech.hermes.common.message.wrapper.SchemaOnlineChecksRateLimiter schemaOnlineChecksWaitingRateLimiter​(pl.allegro.tech.hermes.common.config.ConfigFactory configFactory)
      • prodKafkaNamesMapper

        @Bean
        public pl.allegro.tech.hermes.common.kafka.KafkaNamesMapper prodKafkaNamesMapper​(pl.allegro.tech.hermes.common.config.ConfigFactory configFactory)
      • prodConfigFactory

        @Bean
        public pl.allegro.tech.hermes.common.config.ConfigFactory prodConfigFactory()
      • clock

        @Bean
        public java.time.Clock clock()
      • zookeeperPaths

        @Bean
        public pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths zookeeperPaths​(pl.allegro.tech.hermes.common.config.ConfigFactory configFactory)
      • workloadConstraintsRepository

        @Bean
        public pl.allegro.tech.hermes.domain.workload.constraints.WorkloadConstraintsRepository workloadConstraintsRepository​(org.apache.curator.framework.CuratorFramework curator,
                                                                                                                              com.fasterxml.jackson.databind.ObjectMapper mapper,
                                                                                                                              pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths)
      • hermesMetrics

        @Bean
        public pl.allegro.tech.hermes.common.metric.HermesMetrics hermesMetrics​(com.codahale.metrics.MetricRegistry metricRegistry,
                                                                                pl.allegro.tech.hermes.metrics.PathsCompiler pathCompiler)
      • metricRegistry

        @Bean
        public com.codahale.metrics.MetricRegistry metricRegistry​(pl.allegro.tech.hermes.common.config.ConfigFactory configFactory,
                                                                  pl.allegro.tech.hermes.common.metric.counter.CounterStorage counterStorage,
                                                                  pl.allegro.tech.hermes.common.util.InstanceIdResolver instanceIdResolver,
                                                                  @Named("moduleName")
                                                                  java.lang.String moduleName)
      • moduleName

        @Bean
        @Named("moduleName")
        public java.lang.String moduleName()
      • pathsCompiler

        @Bean
        public pl.allegro.tech.hermes.metrics.PathsCompiler pathsCompiler​(pl.allegro.tech.hermes.common.util.InstanceIdResolver instanceIdResolver)
      • zookeeperCounterStorage

        @Bean
        public pl.allegro.tech.hermes.common.metric.counter.CounterStorage zookeeperCounterStorage​(pl.allegro.tech.hermes.infrastructure.zookeeper.counter.SharedCounter sharedCounter,
                                                                                                   pl.allegro.tech.hermes.domain.subscription.SubscriptionRepository subscriptionRepository,
                                                                                                   pl.allegro.tech.hermes.metrics.PathsCompiler pathsCompiler,
                                                                                                   pl.allegro.tech.hermes.common.config.ConfigFactory configFactory)
      • sharedCounter

        @Bean
        public pl.allegro.tech.hermes.infrastructure.zookeeper.counter.SharedCounter sharedCounter​(org.apache.curator.framework.CuratorFramework zookeeper,
                                                                                                   pl.allegro.tech.hermes.common.config.ConfigFactory config)
      • instanceIdResolver

        @Bean
        public pl.allegro.tech.hermes.common.util.InstanceIdResolver instanceIdResolver()
      • subscriptionOffsetChangeIndicatorFactory

        @Bean
        public pl.allegro.tech.hermes.common.kafka.offset.SubscriptionOffsetChangeIndicator subscriptionOffsetChangeIndicatorFactory​(org.apache.curator.framework.CuratorFramework zookeeper,
                                                                                                                                     pl.allegro.tech.hermes.infrastructure.zookeeper.ZookeeperPaths paths,
                                                                                                                                     pl.allegro.tech.hermes.domain.subscription.SubscriptionRepository subscriptionRepository)