Codota Logo
EveryTenSecondsScheduler.<init>
Code IndexAdd Codota to your IDE (free)

How to use
de.otto.edison.status.scheduler.EveryTenSecondsScheduler
constructor

Best Java code snippets using de.otto.edison.status.scheduler.EveryTenSecondsScheduler.<init> (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: de.otto.edison/edison-status

/**
 * Scheduler that is updating the status every ten seconds.
 *
 * This is used by default, if no other scheduler is configured.
 *
 * @return Scheduler
 */
@Bean
@ConditionalOnMissingBean(Scheduler.class)
public Scheduler fixedDelayScheduler() {
  return new EveryTenSecondsScheduler(
      aggregator
  );
}
origin: otto-de/edison-microservice

  /**
   * Scheduler that is updating the status every ten seconds.
   *
   * This is used by default, if no other scheduler is configured.
   *
   * @param applicationStatusAggregator the ApplicationStatusAggregator scheduled for updates
   * @return Scheduler fixed delay scheduler
   */
  @Bean
  @ConditionalOnMissingBean(Scheduler.class)
  public Scheduler fixedDelayScheduler(final ApplicationStatusAggregator applicationStatusAggregator) {
    return new EveryTenSecondsScheduler(
        applicationStatusAggregator
    );
  }
}
origin: otto-de/edison-microservice

@Test
public void shouldDelegateStatusAggregation() throws Exception {
  final ApplicationStatusAggregator statusAggregator = mock(ApplicationStatusAggregator.class);
  when(statusAggregator.aggregatedStatus()).thenReturn(SOME_STATUS);
  final Scheduler scheduler = new EveryTenSecondsScheduler(statusAggregator);
  scheduler.update();
  assertThat(statusAggregator.aggregatedStatus(), is(SOME_STATUS));
}
origin: otto-de/edison-microservice

  @Test
  public void shouldUpdateStatus() throws Exception {
    final ApplicationStatusAggregator statusAggregator = mock(ApplicationStatusAggregator.class);
    when(statusAggregator.aggregatedStatus())
        .thenReturn(SOME_STATUS)
        .thenReturn(SOME_OTHER_STATUS);

    final Scheduler scheduler = new EveryTenSecondsScheduler(statusAggregator);
    // when
    scheduler.update();
    // then
    assertThat(statusAggregator.aggregatedStatus(), is(SOME_STATUS));
    // when
    scheduler.update();
    // then
    assertThat(statusAggregator.aggregatedStatus(), is(SOME_OTHER_STATUS));
  }
}
de.otto.edison.status.schedulerEveryTenSecondsScheduler<init>

Popular methods of EveryTenSecondsScheduler

    Popular in Java

    • Creating JSON documents from java classes using gson
    • findViewById (Activity)
    • setContentView (Activity)
    • getExternalFilesDir (Context)
    • 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
    • Random (java.util)
      This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
    • Pattern (java.util.regex)
      A compiled representation of a regular expression. A regular expression, specified as a string, must
    • Reference (javax.naming)
    • JTextField (javax.swing)
    • LogFactory (org.apache.commons.logging)
      A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
    Codota Logo
    • Products

      Search for Java codeSearch for JavaScript codeEnterprise
    • IDE Plugins

      IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Codota for your IDE now