Tabnine Logo
AcquiredJobs.removeJobId
Code IndexAdd Tabnine to your IDE (free)

How to use
removeJobId
method
in
org.camunda.bpm.engine.impl.jobexecutor.AcquiredJobs

Best Java code snippets using org.camunda.bpm.engine.impl.jobexecutor.AcquiredJobs.removeJobId (Showing top 7 results out of 315)

origin: camunda/camunda-bpm-platform

public void failedOperation(DbOperation operation) {
 if (operation instanceof DbEntityOperation) {
  DbEntityOperation entityOperation = (DbEntityOperation) operation;
  if(JobEntity.class.isAssignableFrom(entityOperation.getEntityType())) {
   // could not lock the job -> remove it from list of acquired jobs
   acquiredJobs.removeJobId(entityOperation.getEntity().getId());
  }
 }
}
origin: camunda/camunda-bpm-platform

public void failedOperation(DbOperation operation) {
 if (operation instanceof DbEntityOperation) {
  DbEntityOperation entityOperation = (DbEntityOperation) operation;
  if(JobEntity.class.isAssignableFrom(entityOperation.getEntityType())) {
   // could not lock the job -> remove it from list of acquired jobs
   acquiredJobs.removeJobId(entityOperation.getEntity().getId());
  }
 }
}
origin: camunda/camunda-bpm-platform

/**
 * numJobsToAcquire >= numJobsAcquired >= numJobsFailedToLock must hold
 */
protected AcquiredJobs buildAcquiredJobs(int numJobsToAcquire, int numJobsAcquired, int numJobsFailedToLock) {
 AcquiredJobs acquiredJobs = new AcquiredJobs(numJobsToAcquire);
 for (int i = 0; i < numJobsAcquired; i++) {
  acquiredJobs.addJobIdBatch(Arrays.asList(Integer.toString(i)));
 }
 for (int i = 0; i < numJobsFailedToLock; i++) {
  acquiredJobs.removeJobId(Integer.toString(i));
 }
 return acquiredJobs;
}
origin: camunda/camunda-bpm-platform

 public void testAcquiredJobs() {
  List<String> firstBatch = new ArrayList<String>(Arrays.asList("a", "b", "c"));
  List<String> secondBatch = new ArrayList<String>(Arrays.asList("d", "e", "f"));
  List<String> thirdBatch = new ArrayList<String>(Arrays.asList("g"));

  AcquiredJobs acquiredJobs = new AcquiredJobs(0);
  acquiredJobs.addJobIdBatch(firstBatch);
  acquiredJobs.addJobIdBatch(secondBatch);
  acquiredJobs.addJobIdBatch(thirdBatch);

  assertEquals(firstBatch, acquiredJobs.getJobIdBatches().get(0));
  assertEquals(secondBatch, acquiredJobs.getJobIdBatches().get(1));
  assertEquals(thirdBatch, acquiredJobs.getJobIdBatches().get(2));

  acquiredJobs.removeJobId("a");
  assertEquals(Arrays.asList("b", "c"), acquiredJobs.getJobIdBatches().get(0));
  assertEquals(secondBatch, acquiredJobs.getJobIdBatches().get(1));
  assertEquals(thirdBatch, acquiredJobs.getJobIdBatches().get(2));

  assertEquals(3, acquiredJobs.getJobIdBatches().size());
  acquiredJobs.removeJobId("g");
  assertEquals(2, acquiredJobs.getJobIdBatches().size());
 }
}
origin: org.camunda.bpm/camunda-engine

public void failedOperation(DbOperation operation) {
 if (operation instanceof DbEntityOperation) {
  DbEntityOperation entityOperation = (DbEntityOperation) operation;
  if(JobEntity.class.isAssignableFrom(entityOperation.getEntityType())) {
   // could not lock the job -> remove it from list of acquired jobs
   acquiredJobs.removeJobId(entityOperation.getEntity().getId());
  }
 }
}
origin: org.camunda.bpm/camunda-engine

/**
 * numJobsToAcquire >= numJobsAcquired >= numJobsFailedToLock must hold
 */
protected AcquiredJobs buildAcquiredJobs(int numJobsToAcquire, int numJobsAcquired, int numJobsFailedToLock) {
 AcquiredJobs acquiredJobs = new AcquiredJobs(numJobsToAcquire);
 for (int i = 0; i < numJobsAcquired; i++) {
  acquiredJobs.addJobIdBatch(Arrays.asList(Integer.toString(i)));
 }
 for (int i = 0; i < numJobsFailedToLock; i++) {
  acquiredJobs.removeJobId(Integer.toString(i));
 }
 return acquiredJobs;
}
origin: org.camunda.bpm/camunda-engine

 public void testAcquiredJobs() {
  List<String> firstBatch = new ArrayList<String>(Arrays.asList("a", "b", "c"));
  List<String> secondBatch = new ArrayList<String>(Arrays.asList("d", "e", "f"));
  List<String> thirdBatch = new ArrayList<String>(Arrays.asList("g"));

  AcquiredJobs acquiredJobs = new AcquiredJobs(0);
  acquiredJobs.addJobIdBatch(firstBatch);
  acquiredJobs.addJobIdBatch(secondBatch);
  acquiredJobs.addJobIdBatch(thirdBatch);

  assertEquals(firstBatch, acquiredJobs.getJobIdBatches().get(0));
  assertEquals(secondBatch, acquiredJobs.getJobIdBatches().get(1));
  assertEquals(thirdBatch, acquiredJobs.getJobIdBatches().get(2));

  acquiredJobs.removeJobId("a");
  assertEquals(Arrays.asList("b", "c"), acquiredJobs.getJobIdBatches().get(0));
  assertEquals(secondBatch, acquiredJobs.getJobIdBatches().get(1));
  assertEquals(thirdBatch, acquiredJobs.getJobIdBatches().get(2));

  assertEquals(3, acquiredJobs.getJobIdBatches().size());
  acquiredJobs.removeJobId("g");
  assertEquals(2, acquiredJobs.getJobIdBatches().size());
 }
}
org.camunda.bpm.engine.impl.jobexecutorAcquiredJobsremoveJobId

Popular methods of AcquiredJobs

  • size
  • <init>
  • addJobIdBatch
  • getJobIdBatches
  • contains
  • getNumberOfJobsAttemptedToAcquire
  • getNumberOfJobsFailedToLock

Popular in Java

  • Reading from database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (Timer)
  • getContentResolver (Context)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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