congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
BasicSingleProducerEnforcer.onCycleComplete
Code IndexAdd Tabnine to your IDE (free)

How to use
onCycleComplete
method
in
com.netflix.hollow.api.producer.enforcer.BasicSingleProducerEnforcer

Best Java code snippets using com.netflix.hollow.api.producer.enforcer.BasicSingleProducerEnforcer.onCycleComplete (Showing top 3 results out of 315)

origin: Netflix/hollow

@Test
public void testEnabledDisabledCyle() {
  BasicSingleProducerEnforcer se = new BasicSingleProducerEnforcer();
  Assert.assertTrue(se.isPrimary());
  se.onCycleStart(1234L);
  se.onCycleComplete(null, 10L, TimeUnit.SECONDS);
  se.disable();
  Assert.assertFalse(se.isPrimary());
}
origin: Netflix/hollow

@Test
public void testMultiCycle() {
  BasicSingleProducerEnforcer se = new BasicSingleProducerEnforcer();
  for (int i = 0; i < 10; i++) {
    se.enable();
    Assert.assertTrue(se.isPrimary());
    se.onCycleStart(1234L);
    se.disable();
    Assert.assertTrue(se.isPrimary());
    se.onCycleComplete(null, 10L, TimeUnit.SECONDS);
    Assert.assertFalse(se.isPrimary());
  }
}
origin: Netflix/hollow

@Test
public void testTransitions() {
  BasicSingleProducerEnforcer se = new BasicSingleProducerEnforcer();
  Assert.assertTrue(se.isPrimary());
  se.onCycleStart(1234L);
  Assert.assertTrue(se.isPrimary());
  se.disable();
  Assert.assertTrue(se.isPrimary());
  se.onCycleComplete(null, 10L, TimeUnit.SECONDS);
  Assert.assertFalse(se.isPrimary());
  se.enable();
  Assert.assertTrue(se.isPrimary());
  se.onCycleStart(1235L);
  Assert.assertTrue(se.isPrimary());
  se.disable();
  Assert.assertTrue(se.isPrimary());
  se.onCycleComplete(null, 10L, TimeUnit.SECONDS);
  Assert.assertFalse(se.isPrimary());
}
com.netflix.hollow.api.producer.enforcerBasicSingleProducerEnforceronCycleComplete

Popular methods of BasicSingleProducerEnforcer

  • <init>
  • disable
  • enable
  • isPrimary
  • onCycleStart

Popular in Java

  • Making http requests using okhttp
  • getSupportFragmentManager (FragmentActivity)
  • setRequestProperty (URLConnection)
  • onRequestPermissionsResult (Fragment)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Top PhpStorm plugins
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