congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
CleanableHistoricBatchReportResult.getFinishedBatchesCount
Code IndexAdd Tabnine to your IDE (free)

How to use
getFinishedBatchesCount
method
in
org.camunda.bpm.engine.history.CleanableHistoricBatchReportResult

Best Java code snippets using org.camunda.bpm.engine.history.CleanableHistoricBatchReportResult.getFinishedBatchesCount (Showing top 10 results out of 315)

origin: camunda/camunda-bpm-platform

public static List<CleanableHistoricBatchReportResultDto> convert(List<CleanableHistoricBatchReportResult> reportResult) {
 List<CleanableHistoricBatchReportResultDto> dtos = new ArrayList<CleanableHistoricBatchReportResultDto>();
 for (CleanableHistoricBatchReportResult current : reportResult) {
  CleanableHistoricBatchReportResultDto dto = new CleanableHistoricBatchReportResultDto();
  dto.setBatchType(current.getBatchType());
  dto.setHistoryTimeToLive(current.getHistoryTimeToLive());
  dto.setFinishedBatchesCount(current.getFinishedBatchesCount());
  dto.setCleanableBatchesCount(current.getCleanableBatchesCount());
  dtos.add(dto);
 }
 return dtos;
}
origin: camunda/camunda-bpm-platform

public static List<CleanableHistoricBatchReportResultDto> convert(List<CleanableHistoricBatchReportResult> reportResult) {
 List<CleanableHistoricBatchReportResultDto> dtos = new ArrayList<CleanableHistoricBatchReportResultDto>();
 for (CleanableHistoricBatchReportResult current : reportResult) {
  CleanableHistoricBatchReportResultDto dto = new CleanableHistoricBatchReportResultDto();
  dto.setBatchType(current.getBatchType());
  dto.setHistoryTimeToLive(current.getHistoryTimeToLive());
  dto.setFinishedBatchesCount(current.getFinishedBatchesCount());
  dto.setCleanableBatchesCount(current.getCleanableBatchesCount());
  dtos.add(dto);
 }
 return dtos;
}
origin: camunda/camunda-bpm-platform

private void setupHistoryReportMock() {
 CleanableHistoricBatchReport report = mock(CleanableHistoricBatchReport.class);
 CleanableHistoricBatchReportResult reportResult = mock(CleanableHistoricBatchReportResult.class);
 when(reportResult.getBatchType()).thenReturn(EXAMPLE_TYPE);
 when(reportResult.getHistoryTimeToLive()).thenReturn(EXAMPLE_TTL);
 when(reportResult.getFinishedBatchesCount()).thenReturn(EXAMPLE_FINISHED_COUNT);
 when(reportResult.getCleanableBatchesCount()).thenReturn(EXAMPLE_CLEANABLE_COUNT);
 CleanableHistoricBatchReportResult anotherReportResult = mock(CleanableHistoricBatchReportResult.class);
 when(anotherReportResult.getBatchType()).thenReturn("batchId2");
 when(anotherReportResult.getHistoryTimeToLive()).thenReturn(null);
 when(anotherReportResult.getFinishedBatchesCount()).thenReturn(13l);
 when(anotherReportResult.getCleanableBatchesCount()).thenReturn(0l);
 List<CleanableHistoricBatchReportResult> mocks = new ArrayList<CleanableHistoricBatchReportResult>();
 mocks.add(reportResult);
 mocks.add(anotherReportResult);
 when(report.list()).thenReturn(mocks);
 when(report.count()).thenReturn((long) mocks.size());
 historicBatchReport = report;
 when(processEngine.getHistoryService().createCleanableHistoricBatchReport()).thenReturn(historicBatchReport);
}
origin: camunda/camunda-bpm-platform

private void checkResultNumbers(CleanableHistoricBatchReportResult result, int expectedCleanable, int expectedFinished, Integer expectedTTL) {
 assertEquals(expectedCleanable, result.getCleanableBatchesCount());
 assertEquals(expectedFinished, result.getFinishedBatchesCount());
 assertEquals(expectedTTL, result.getHistoryTimeToLive());
}
origin: camunda/camunda-bpm-platform

private void checkResultNumbers(CleanableHistoricBatchReportResult result, int expectedCleanable, int expectedFinished, Integer expectedTTL) {
 assertEquals(expectedCleanable, result.getCleanableBatchesCount());
 assertEquals(expectedFinished, result.getFinishedBatchesCount());
 assertEquals(expectedTTL, result.getHistoryTimeToLive());
}
origin: camunda/camunda-bpm-platform

@Test
public void shouldSeeCleanableBatchesInReport() {
 // given
 engineConfiguration
  .setHistoryRemovalTimeStrategy(HISTORY_REMOVAL_TIME_STRATEGY_START)
  .initHistoryRemovalTime();
 engineConfiguration.setBatchOperationHistoryTimeToLive("P5D");
 engineConfiguration.initHistoryCleanup();
 testRule.deploy(PROCESS);
 String processInstanceId = runtimeService.startProcessInstanceByKey(PROCESS_KEY).getId();
 ClockUtil.setCurrentTime(END_DATE);
 Batch batch = runtimeService.deleteProcessInstancesAsync(Collections.singletonList(processInstanceId), "aDeleteReason");
 ClockUtil.setCurrentTime(addDays(END_DATE, 5));
 // when
 CleanableHistoricBatchReportResult report = historyService.createCleanableHistoricBatchReport().singleResult();
 // then
 assertThat(report.getCleanableBatchesCount(), is(1L));
 assertThat(report.getFinishedBatchesCount(), is(0L));
 // cleanup
 managementService.deleteBatch(batch.getId(), true);
}
origin: camunda/camunda-bpm-platform

@Test
public void shouldNotSeeCleanableBatchesInReport() {
 // given
 engineConfiguration
  .setHistoryRemovalTimeStrategy(HISTORY_REMOVAL_TIME_STRATEGY_END)
  .initHistoryRemovalTime();
 engineConfiguration.setBatchOperationHistoryTimeToLive("P5D");
 engineConfiguration.initHistoryCleanup();
 testRule.deploy(PROCESS);
 String processInstanceId = runtimeService.startProcessInstanceByKey(PROCESS_KEY).getId();
 ClockUtil.setCurrentTime(END_DATE);
 Batch batch = runtimeService.deleteProcessInstancesAsync(Collections.singletonList(processInstanceId), "aDeleteReason");
 ClockUtil.setCurrentTime(addDays(END_DATE, 5));
 // when
 CleanableHistoricBatchReportResult report = historyService.createCleanableHistoricBatchReport().singleResult();
 // then
 assertThat(report.getCleanableBatchesCount(), is(0L));
 assertThat(report.getFinishedBatchesCount(), is(0L));
 // cleanup
 managementService.deleteBatch(batch.getId(), true);
}
origin: org.camunda.bpm/camunda-engine-rest-jaxrs2

public static List<CleanableHistoricBatchReportResultDto> convert(List<CleanableHistoricBatchReportResult> reportResult) {
 List<CleanableHistoricBatchReportResultDto> dtos = new ArrayList<CleanableHistoricBatchReportResultDto>();
 for (CleanableHistoricBatchReportResult current : reportResult) {
  CleanableHistoricBatchReportResultDto dto = new CleanableHistoricBatchReportResultDto();
  dto.setBatchType(current.getBatchType());
  dto.setHistoryTimeToLive(current.getHistoryTimeToLive());
  dto.setFinishedBatchesCount(current.getFinishedBatchesCount());
  dto.setCleanableBatchesCount(current.getCleanableBatchesCount());
  dtos.add(dto);
 }
 return dtos;
}
origin: org.camunda.bpm/camunda-engine

private void checkResultNumbers(CleanableHistoricBatchReportResult result, int expectedCleanable, int expectedFinished, Integer expectedTTL) {
 assertEquals(expectedCleanable, result.getCleanableBatchesCount());
 assertEquals(expectedFinished, result.getFinishedBatchesCount());
 assertEquals(expectedTTL, result.getHistoryTimeToLive());
}
origin: org.camunda.bpm/camunda-engine

private void checkResultNumbers(CleanableHistoricBatchReportResult result, int expectedCleanable, int expectedFinished, Integer expectedTTL) {
 assertEquals(expectedCleanable, result.getCleanableBatchesCount());
 assertEquals(expectedFinished, result.getFinishedBatchesCount());
 assertEquals(expectedTTL, result.getHistoryTimeToLive());
}
org.camunda.bpm.engine.historyCleanableHistoricBatchReportResultgetFinishedBatchesCount

Javadoc

Returns the amount of finished historic batches.

Popular methods of CleanableHistoricBatchReportResult

  • getBatchType
    Returns the batch type.
  • getCleanableBatchesCount
    Returns the amount of cleanable historic batches.
  • getHistoryTimeToLive
    Returns the history time to live for the selected batch type.

Popular in Java

  • Reading from database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • getSystemService (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Top 17 PhpStorm 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