org.esbtools.eventhandler.lightblue.config

Class EventHandlerConfigEntity

  • java.lang.Object
    • org.esbtools.eventhandler.lightblue.config.EventHandlerConfigEntity
    • Constructor Detail

      • EventHandlerConfigEntity

        public EventHandlerConfigEntity()
    • Method Detail

      • getDomain

        public String getDomain()
      • setDomain

        @Identity
         @Required
         @Description(value="Identifies a set of configuration values. Since all config is contained in a single document in a collection, it is necessary to know how to refer to that document: you refer to it by its domain.")
        public void setDomain(String domain)
      • setCanonicalTypesToProcess

        @Description(value="Governs whether or not document events are processed based on their type.")
        public void setCanonicalTypesToProcess(Set<String> canonicalTypesToProcess)
      • setDocumentEventsBatchSize

        @Description(value="Not to be confused with the maximum number of document events passed to DocumentEventRepository.retrievePriorityDocumentEventsUpTo(int), this governs the max batch size of events fetched from lightblue and available for optimization.\nFor example, if you ask for 50 document events to be retrieved, and your batch size is 100, we will initially fetch 100 document events (assuming there are >= 100 events waiting to be processed) from lightblue. Among those 100, we will try to optimize away as many events as possible by checking for events which can be merged or superseded. Finally, among those left, we will return the 50 highest priority events. Any remaining events past 50 will be untouched, available for future retrievals.")
        public void setDocumentEventsBatchSize(Integer documentEventsBatchSize)
      • getDocumentEventProcessingTimeoutSeconds

        public Integer getDocumentEventProcessingTimeoutSeconds()
      • setDocumentEventProcessingTimeoutSeconds

        @Description(value="How long can a document event remain processing before we allow it to be retrieved again for reprocessing?")
        public void setDocumentEventProcessingTimeoutSeconds(Integer documentEventProcessingTimeoutSeconds)
      • getDocumentEventExpireThresholdSeconds

        public Integer getDocumentEventExpireThresholdSeconds()
      • setDocumentEventExpireThresholdSeconds

        @Description(value="How long before a document event is available for retrieval do we drop the event and let it be reprocessed?\nIn other words, this governs when we stop processing an event in flight because we\'re too near when another retrieval may see it is past its getDocumentEventProcessingTimeout() and retrieve it for reprocessing.\nN.B. The existence of this configuration is a function of our current transaction scheme. This could go away, for instance, if we either atomically updated an event\'s processing timestamp before publishing its document. Other alternative schemes are possible.")
        public void setDocumentEventExpireThresholdSeconds(Integer documentEventExpireThresholdSeconds)
      • getOptionalMaxDocumentEventsPerInsert

        @Transient
        public Optional<Integer> getOptionalMaxDocumentEventsPerInsert()
        Description copied from interface: LightblueDocumentEventRepositoryConfig
        When adding new document events, we can make (total new events) / (max events per insert) requests, instead of one request with all new events in a single call. If no integer is provided (the optional is empty), we will do one request with all new events.

        Setting a limit is recommended as it protects against potentially extremely significant notifications producing a huge quantity of document events and failing to insert them all in one call.

        Specified by:
        getOptionalMaxDocumentEventsPerInsert in interface LightblueDocumentEventRepositoryConfig
      • getMaxDocumentEventsPerInsert

        public Integer getMaxDocumentEventsPerInsert()
      • setMaxDocumentEventsPerInsert

        @Description(value="When adding new document events, we can make (total new events) / (max events per insert) requests, instead of one request with all new events in a single call. If no integer is provided, we will do one request with all new events.\nSetting a limit is recommended as it protects against potentially extremely significant notifications producing a huge quantity of document events and failing to insert them all in one call.")
        public void setMaxDocumentEventsPerInsert(@Nullable
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Integer maxDocumentEventsPerInsert)
      • setEntityNamesToProcess

        @Description(value="Governs whether or not notifications are processed based on their associated entity\'s name.")
        public void setEntityNamesToProcess(Set<String> entityNamesToProcess)
      • getNotificationProcessingTimeoutSeconds

        public Integer getNotificationProcessingTimeoutSeconds()
      • setNotificationProcessingTimeoutSeconds

        @Description(value="How long can a notification remain processing before we allow it to be retrieved again for reprocessing?")
        public void setNotificationProcessingTimeoutSeconds(Integer notificationProcessingTimeoutSeconds)
      • getNotificationExpireThreshold

        @Transient
        public java.time.Duration getNotificationExpireThreshold()
        Description copied from interface: LightblueNotificationRepositoryConfig
        How long before a notification is available for retrieval do we drop the notification and let it be reprocessed?

        In other words, this governs when we stop processing a notification in flight because we're too near when another retrieval may see it is past its LightblueNotificationRepositoryConfig.getNotificationProcessingTimeout() and retrieve it for reprocessing.

        N.B. The existence of this configuration is a function of our current transaction scheme. This could go away, for instance, if we either atomically updated a notification's processing timestamp before adding its document events. Other alternative schemes are possible.

        Specified by:
        getNotificationExpireThreshold in interface LightblueNotificationRepositoryConfig
      • getNotificationExpireThresholdSeconds

        public Integer getNotificationExpireThresholdSeconds()
      • setNotificationExpireThresholdSeconds

        @Description(value="How long before a notification is available for retrieval do we drop the event and let it be reprocessed?\nIn other words, this governs when we stop processing a notification in flight because we\'re too near when another retrieval may see it is past its getNotificationProcessingTimeout() and retrieve it for reprocessing.\nN.B. The existence of this configuration is a function of our current transaction scheme. This could go away, for instance, if we either atomically updated a notification\'s processing timestamp before adding its document events. Other alternative schemes are possible.")
        public void setNotificationExpireThresholdSeconds(Integer notificationExpireThresholdSeconds)

Copyright © 2017. All rights reserved.