Class SubscriptionService
- java.lang.Object
-
- pl.allegro.tech.hermes.management.domain.subscription.SubscriptionService
-
public class SubscriptionService extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SubscriptionService(pl.allegro.tech.hermes.domain.subscription.SubscriptionRepository subscriptionRepository, SubscriptionOwnerCache subscriptionOwnerCache, TopicService topicService, SubscriptionMetricsRepository metricsRepository, SubscriptionHealthChecker subscriptionHealthChecker, pl.allegro.tech.hermes.tracker.management.LogRepository logRepository, SubscriptionValidator subscriptionValidator, Auditor auditor, MultiDatacenterRepositoryCommandExecutor multiDcExecutor, MultiDCAwareService multiDCAwareService, RepositoryManager repositoryManager, java.util.concurrent.ExecutorService unhealthyGetExecutorService, long unhealthyGetTimeoutMillis, SubscriptionRemover subscriptionRemover)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateSubscription(pl.allegro.tech.hermes.api.Subscription subscription, RequestUser createdBy, java.lang.String qualifiedTopicName)java.util.List<pl.allegro.tech.hermes.api.Subscription>getAllSubscriptions()java.util.List<pl.allegro.tech.hermes.api.UnhealthySubscription>getAllUnhealthy(boolean respectMonitoringSeverity, java.util.List<java.lang.String> subscriptionNames, java.util.List<java.lang.String> qualifiedTopicNames)java.util.List<pl.allegro.tech.hermes.api.Subscription>getForOwnerId(pl.allegro.tech.hermes.api.OwnerId ownerId)java.util.Optional<pl.allegro.tech.hermes.api.SentMessageTrace>getLatestUndeliveredMessage(pl.allegro.tech.hermes.api.TopicName topicName, java.lang.String subscriptionName)java.util.List<pl.allegro.tech.hermes.api.SentMessageTrace>getLatestUndeliveredMessagesTrackerLogs(pl.allegro.tech.hermes.api.TopicName topicName, java.lang.String subscriptionName)java.util.List<pl.allegro.tech.hermes.api.MessageTrace>getMessageStatus(java.lang.String qualifiedTopicName, java.lang.String subscriptionName, java.lang.String messageId)pl.allegro.tech.hermes.api.PersistentSubscriptionMetricsgetPersistentSubscriptionMetrics(pl.allegro.tech.hermes.api.TopicName topicName, java.lang.String subscriptionName)pl.allegro.tech.hermes.api.SubscriptiongetSubscriptionDetails(pl.allegro.tech.hermes.api.TopicName topicName, java.lang.String subscriptionName)pl.allegro.tech.hermes.api.SubscriptionHealthgetSubscriptionHealth(pl.allegro.tech.hermes.api.TopicName topicName, java.lang.String subscriptionName)pl.allegro.tech.hermes.api.SubscriptionMetricsgetSubscriptionMetrics(pl.allegro.tech.hermes.api.TopicName topicName, java.lang.String subscriptionName)pl.allegro.tech.hermes.api.Subscription.StategetSubscriptionState(pl.allegro.tech.hermes.api.TopicName topicName, java.lang.String subscriptionName)java.util.List<pl.allegro.tech.hermes.api.UnhealthySubscription>getUnhealthyForOwner(pl.allegro.tech.hermes.api.OwnerId ownerId, boolean respectMonitoringSeverity, java.util.List<java.lang.String> subscriptionNames, java.util.List<java.lang.String> qualifiedTopicNames)java.util.List<java.lang.String>listFilteredSubscriptionNames(pl.allegro.tech.hermes.api.TopicName topicName, pl.allegro.tech.hermes.api.Query<pl.allegro.tech.hermes.api.Subscription> query)java.util.List<java.lang.String>listSubscriptionNames(pl.allegro.tech.hermes.api.TopicName topicName)java.util.List<pl.allegro.tech.hermes.api.Subscription>listSubscriptions(pl.allegro.tech.hermes.api.TopicName topicName)java.util.List<java.lang.String>listTrackedSubscriptionNames(pl.allegro.tech.hermes.api.TopicName topicName)java.util.List<pl.allegro.tech.hermes.api.Subscription>querySubscription(pl.allegro.tech.hermes.api.Query<pl.allegro.tech.hermes.api.Subscription> query)java.util.List<pl.allegro.tech.hermes.api.SubscriptionNameWithMetrics>querySubscriptionsMetrics(pl.allegro.tech.hermes.api.Query<pl.allegro.tech.hermes.api.SubscriptionNameWithMetrics> query)voidremoveSubscription(pl.allegro.tech.hermes.api.TopicName topicName, java.lang.String subscriptionName, RequestUser removedBy)voidupdateSubscription(pl.allegro.tech.hermes.api.TopicName topicName, java.lang.String subscriptionName, pl.allegro.tech.hermes.api.PatchData patch, RequestUser modifiedBy)voidupdateSubscriptionState(pl.allegro.tech.hermes.api.TopicName topicName, java.lang.String subscriptionName, pl.allegro.tech.hermes.api.Subscription.State state, RequestUser modifiedBy)
-
-
-
Constructor Detail
-
SubscriptionService
public SubscriptionService(pl.allegro.tech.hermes.domain.subscription.SubscriptionRepository subscriptionRepository, SubscriptionOwnerCache subscriptionOwnerCache, TopicService topicService, SubscriptionMetricsRepository metricsRepository, SubscriptionHealthChecker subscriptionHealthChecker, pl.allegro.tech.hermes.tracker.management.LogRepository logRepository, SubscriptionValidator subscriptionValidator, Auditor auditor, MultiDatacenterRepositoryCommandExecutor multiDcExecutor, MultiDCAwareService multiDCAwareService, RepositoryManager repositoryManager, java.util.concurrent.ExecutorService unhealthyGetExecutorService, long unhealthyGetTimeoutMillis, SubscriptionRemover subscriptionRemover)
-
-
Method Detail
-
listSubscriptionNames
public java.util.List<java.lang.String> listSubscriptionNames(pl.allegro.tech.hermes.api.TopicName topicName)
-
listTrackedSubscriptionNames
public java.util.List<java.lang.String> listTrackedSubscriptionNames(pl.allegro.tech.hermes.api.TopicName topicName)
-
listFilteredSubscriptionNames
public java.util.List<java.lang.String> listFilteredSubscriptionNames(pl.allegro.tech.hermes.api.TopicName topicName, pl.allegro.tech.hermes.api.Query<pl.allegro.tech.hermes.api.Subscription> query)
-
listSubscriptions
public java.util.List<pl.allegro.tech.hermes.api.Subscription> listSubscriptions(pl.allegro.tech.hermes.api.TopicName topicName)
-
createSubscription
public void createSubscription(pl.allegro.tech.hermes.api.Subscription subscription, RequestUser createdBy, java.lang.String qualifiedTopicName)
-
getSubscriptionDetails
public pl.allegro.tech.hermes.api.Subscription getSubscriptionDetails(pl.allegro.tech.hermes.api.TopicName topicName, java.lang.String subscriptionName)
-
removeSubscription
public void removeSubscription(pl.allegro.tech.hermes.api.TopicName topicName, java.lang.String subscriptionName, RequestUser removedBy)
-
updateSubscription
public void updateSubscription(pl.allegro.tech.hermes.api.TopicName topicName, java.lang.String subscriptionName, pl.allegro.tech.hermes.api.PatchData patch, RequestUser modifiedBy)
-
updateSubscriptionState
public void updateSubscriptionState(pl.allegro.tech.hermes.api.TopicName topicName, java.lang.String subscriptionName, pl.allegro.tech.hermes.api.Subscription.State state, RequestUser modifiedBy)
-
getSubscriptionState
public pl.allegro.tech.hermes.api.Subscription.State getSubscriptionState(pl.allegro.tech.hermes.api.TopicName topicName, java.lang.String subscriptionName)
-
getSubscriptionMetrics
public pl.allegro.tech.hermes.api.SubscriptionMetrics getSubscriptionMetrics(pl.allegro.tech.hermes.api.TopicName topicName, java.lang.String subscriptionName)
-
getPersistentSubscriptionMetrics
public pl.allegro.tech.hermes.api.PersistentSubscriptionMetrics getPersistentSubscriptionMetrics(pl.allegro.tech.hermes.api.TopicName topicName, java.lang.String subscriptionName)
-
getSubscriptionHealth
public pl.allegro.tech.hermes.api.SubscriptionHealth getSubscriptionHealth(pl.allegro.tech.hermes.api.TopicName topicName, java.lang.String subscriptionName)
-
getLatestUndeliveredMessage
public java.util.Optional<pl.allegro.tech.hermes.api.SentMessageTrace> getLatestUndeliveredMessage(pl.allegro.tech.hermes.api.TopicName topicName, java.lang.String subscriptionName)
-
getLatestUndeliveredMessagesTrackerLogs
public java.util.List<pl.allegro.tech.hermes.api.SentMessageTrace> getLatestUndeliveredMessagesTrackerLogs(pl.allegro.tech.hermes.api.TopicName topicName, java.lang.String subscriptionName)
-
getMessageStatus
public java.util.List<pl.allegro.tech.hermes.api.MessageTrace> getMessageStatus(java.lang.String qualifiedTopicName, java.lang.String subscriptionName, java.lang.String messageId)
-
querySubscription
public java.util.List<pl.allegro.tech.hermes.api.Subscription> querySubscription(pl.allegro.tech.hermes.api.Query<pl.allegro.tech.hermes.api.Subscription> query)
-
querySubscriptionsMetrics
public java.util.List<pl.allegro.tech.hermes.api.SubscriptionNameWithMetrics> querySubscriptionsMetrics(pl.allegro.tech.hermes.api.Query<pl.allegro.tech.hermes.api.SubscriptionNameWithMetrics> query)
-
getAllSubscriptions
public java.util.List<pl.allegro.tech.hermes.api.Subscription> getAllSubscriptions()
-
getForOwnerId
public java.util.List<pl.allegro.tech.hermes.api.Subscription> getForOwnerId(pl.allegro.tech.hermes.api.OwnerId ownerId)
-
getAllUnhealthy
public java.util.List<pl.allegro.tech.hermes.api.UnhealthySubscription> getAllUnhealthy(boolean respectMonitoringSeverity, java.util.List<java.lang.String> subscriptionNames, java.util.List<java.lang.String> qualifiedTopicNames)
-
getUnhealthyForOwner
public java.util.List<pl.allegro.tech.hermes.api.UnhealthySubscription> getUnhealthyForOwner(pl.allegro.tech.hermes.api.OwnerId ownerId, boolean respectMonitoringSeverity, java.util.List<java.lang.String> subscriptionNames, java.util.List<java.lang.String> qualifiedTopicNames)
-
-