congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
SingleConsumerCondition.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.camunda.bpm.engine.impl.util.SingleConsumerCondition
constructor

Best Java code snippets using org.camunda.bpm.engine.impl.util.SingleConsumerCondition.<init> (Showing top 10 results out of 315)

origin: camunda/camunda-bpm-platform

public FetchAndLockHandlerImpl() {
 this.condition = new SingleConsumerCondition(handlerThread);
}
origin: camunda/camunda-bpm-platform

@Test(timeout=10000)
public void shouldNotBlockIfSignalAvailableDifferentThread() throws InterruptedException {
 final SingleConsumerCondition condition = new SingleConsumerCondition(Thread.currentThread());
 Thread consumer = new Thread() {
  @Override
  public void run() {
   condition.signal();
  }
 };
 consumer.start();
 consumer.join();
 // then
 condition.await(100000);
}
origin: camunda/camunda-bpm-platform

@Test
public void cannotCreateWithNull() {
 try {
  new SingleConsumerCondition(null);
  Assert.fail("expected exception");
 }
 catch (IllegalArgumentException e) {
  // expected
 }
}
origin: camunda/camunda-bpm-platform

@Test
public void cannotAwaitFromDifferentThread() {
 // given
 SingleConsumerCondition condition = new SingleConsumerCondition(new Thread());
 // when then
 try {
  condition.await(0);
  Assert.fail("expected exception");
 }
 catch (RuntimeException e) {
  // expected
 }
}
origin: camunda/camunda-bpm-platform

@Test(timeout=10000)
public void shouldNotBlockIfSignalAvailable() {
 SingleConsumerCondition condition = new SingleConsumerCondition(Thread.currentThread());
 // given
 condition.signal();
 // then
 condition.await(100000);
}
origin: org.camunda.bpm/camunda-engine-rest-jaxrs2

public FetchAndLockHandlerImpl() {
 this.condition = new SingleConsumerCondition(handlerThread);
}
origin: org.camunda.bpm/camunda-engine

@Test(timeout=10000)
public void shouldNotBlockIfSignalAvailableDifferentThread() throws InterruptedException {
 final SingleConsumerCondition condition = new SingleConsumerCondition(Thread.currentThread());
 Thread consumer = new Thread() {
  @Override
  public void run() {
   condition.signal();
  }
 };
 consumer.start();
 consumer.join();
 // then
 condition.await(100000);
}
origin: org.camunda.bpm/camunda-engine

@Test
public void cannotCreateWithNull() {
 try {
  new SingleConsumerCondition(null);
  Assert.fail("expected exception");
 }
 catch (IllegalArgumentException e) {
  // expected
 }
}
origin: org.camunda.bpm/camunda-engine

@Test
public void cannotAwaitFromDifferentThread() {
 // given
 SingleConsumerCondition condition = new SingleConsumerCondition(new Thread());
 // when then
 try {
  condition.await(0);
  Assert.fail("expected exception");
 }
 catch (RuntimeException e) {
  // expected
 }
}
origin: org.camunda.bpm/camunda-engine

@Test(timeout=10000)
public void shouldNotBlockIfSignalAvailable() {
 SingleConsumerCondition condition = new SingleConsumerCondition(Thread.currentThread());
 // given
 condition.signal();
 // then
 condition.await(100000);
}
org.camunda.bpm.engine.impl.utilSingleConsumerCondition<init>

Popular methods of SingleConsumerCondition

  • signal
  • await

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getExternalFilesDir (Context)
  • requestLocationUpdates (LocationManager)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JCheckBox (javax.swing)
  • 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