Tabnine Logo
TopicRepository.topicExists
Code IndexAdd Tabnine to your IDE (free)

How to use
topicExists
method
in
pl.allegro.tech.hermes.domain.topic.TopicRepository

Best Java code snippets using pl.allegro.tech.hermes.domain.topic.TopicRepository.topicExists (Showing top 3 results out of 315)

origin: allegro/hermes

public TopicMetrics getTopicMetrics(TopicName topicName) {
  return topicRepository.topicExists(topicName) ? metricRepository.loadMetrics(topicName) : TopicMetrics.unavailable();
}
origin: allegro/hermes

private void ensureTopicDoesNotExist(Topic topic) {
  if (topicRepository.topicExists(topic.getName())) {
    throw new TopicAlreadyExistsException(topic.getName());
  }
}
origin: allegro/hermes

private SubscriptionName createSubscription(SubscriptionName subscriptionName) {
  Subscription subscription = subscription(subscriptionName).build();
  Group group = Group.from(subscription.getTopicName().getGroupName());
  if (!groupRepository.groupExists(group.getGroupName())) {
    groupRepository.createGroup(group);
  }
  if (!topicRepository.topicExists(subscription.getTopicName())) {
    topicRepository.createTopic(topic(subscription.getTopicName()).build());
  }
  subscriptionRepository.createSubscription(subscription);
  await().atMost(adjust(ONE_SECOND)).until(
      () -> {
        subscriptionRepository.subscriptionExists(subscription.getTopicName(), subscription.getName());
        subscriptionsCaches.forEach(subscriptionsCache ->
            subscriptionsCache.listActiveSubscriptionNames().contains(subscriptionName));
      }
  );
  return subscription.getQualifiedName();
}
pl.allegro.tech.hermes.domain.topicTopicRepositorytopicExists

Popular methods of TopicRepository

  • getTopicDetails
  • listTopicNames
  • createTopic
  • listTopics
  • ensureTopicExists
  • getTopicsDetails
  • isSubscribingRestricted
  • removeTopic
  • touchTopic
  • updateTopic

Popular in Java

  • Updating database using SQL prepared statement
  • runOnUiThread (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • setRequestProperty (URLConnection)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Option (scala)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now