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

How to use
CachePurgeReport
in
org.camunda.bpm.engine.impl.persistence.deploy.cache

Best Java code snippets using org.camunda.bpm.engine.impl.persistence.deploy.cache.CachePurgeReport (Showing top 20 results out of 315)

origin: camunda/camunda-bpm-platform

if (!cachePurgeReport.isEmpty()) {
 builder.append(CACHE_IS_NOT_CLEAN).append(cachePurgeReport.getPurgeReportAsString());
origin: camunda/camunda-bpm-platform

@Override
public String getPurgeReportAsString() {
 StringBuilder builder = new StringBuilder();
 for (String key : deletedCache.keySet()) {
  builder.append("Cache: ").append(key)
      .append(" contains: ").append(getReportValue(key))
      .append("\n");
 }
 return builder.toString();
}
origin: camunda/camunda-bpm-platform

public CachePurgeReport purgeCache() {
 CachePurgeReport result = new CachePurgeReport();
 Cache<String, ProcessDefinitionEntity> processDefinitionCache = getProcessDefinitionCache();
 if (!processDefinitionCache.isEmpty()) {
  result.addPurgeInformation(CachePurgeReport.PROCESS_DEF_CACHE, processDefinitionCache.keySet());
  processDefinitionCache.clear();
  result.addPurgeInformation(CachePurgeReport.BPMN_MODEL_INST_CACHE, bpmnModelInstanceCache.keySet());
  bpmnModelInstanceCache.clear();
  result.addPurgeInformation(CachePurgeReport.CASE_DEF_CACHE, caseDefinitionCache.keySet());
  caseDefinitionCache.clear();
  result.addPurgeInformation(CachePurgeReport.CASE_MODEL_INST_CACHE, cmmnModelInstanceCache.keySet());
  cmmnModelInstanceCache.clear();
  result.addPurgeInformation(CachePurgeReport.DMN_DEF_CACHE, decisionDefinitionCache.keySet());
  decisionDefinitionCache.clear();
  result.addPurgeInformation(CachePurgeReport.DMN_MODEL_INST_CACHE, dmnModelInstanceCache.keySet());
  dmnModelInstanceCache.clear();
  result.addPurgeInformation(CachePurgeReport.DMN_REQ_DEF_CACHE, decisionRequirementsDefinitionCache.keySet());
  decisionRequirementsDefinitionCache.clear();
origin: camunda/camunda-bpm-platform

 public boolean isEmpty() {
  return cachePurgeReport.isEmpty() && databasePurgeReport.isEmpty();
 }
}
origin: camunda/camunda-bpm-platform

/**
 * Ensures that the deployment cache is empty after a test. If not the cache
 * will be cleared.
 *
 * @param processEngine the {@link ProcessEngine} to test
 * @param fail if true the method will throw an {@link AssertionError} if the deployment cache is not clean
 * @return the deployment cache summary if fail is set to false or null if deployment cache was clean
 * @throws AssertionError if the deployment cache was not clean and fail is set to true
 */
public static String assertAndEnsureCleanDeploymentCache(ProcessEngine processEngine, boolean fail) {
 StringBuilder outputMessage = new StringBuilder();
 ProcessEngineConfigurationImpl processEngineConfiguration = ((ProcessEngineImpl) processEngine).getProcessEngineConfiguration();
 CachePurgeReport cachePurgeReport = processEngineConfiguration.getDeploymentCache().purgeCache();
 outputMessage.append(cachePurgeReport.getPurgeReportAsString());
 if (outputMessage.length() > 0) {
  outputMessage.insert(0, "Deployment cache not clean:\n");
  LOG.error(outputMessage.toString());
  if (fail) {
   Assert.fail(outputMessage.toString());
  }
  return outputMessage.toString();
 }
 else {
  LOG.debug("Deployment cache was clean");
  return null;
 }
}
origin: camunda/camunda-bpm-platform

public CachePurgeReport purgeCache() {
 CachePurgeReport result = new CachePurgeReport();
 Cache<String, ProcessDefinitionEntity> processDefinitionCache = getProcessDefinitionCache();
 if (!processDefinitionCache.isEmpty()) {
  result.addPurgeInformation(CachePurgeReport.PROCESS_DEF_CACHE, processDefinitionCache.keySet());
  processDefinitionCache.clear();
  result.addPurgeInformation(CachePurgeReport.BPMN_MODEL_INST_CACHE, bpmnModelInstanceCache.keySet());
  bpmnModelInstanceCache.clear();
  result.addPurgeInformation(CachePurgeReport.CASE_DEF_CACHE, caseDefinitionCache.keySet());
  caseDefinitionCache.clear();
  result.addPurgeInformation(CachePurgeReport.CASE_MODEL_INST_CACHE, cmmnModelInstanceCache.keySet());
  cmmnModelInstanceCache.clear();
  result.addPurgeInformation(CachePurgeReport.DMN_DEF_CACHE, decisionDefinitionCache.keySet());
  decisionDefinitionCache.clear();
  result.addPurgeInformation(CachePurgeReport.DMN_MODEL_INST_CACHE, dmnModelInstanceCache.keySet());
  dmnModelInstanceCache.clear();
  result.addPurgeInformation(CachePurgeReport.DMN_REQ_DEF_CACHE, decisionRequirementsDefinitionCache.keySet());
  decisionRequirementsDefinitionCache.clear();
origin: camunda/camunda-bpm-platform

 public boolean isEmpty() {
  return cachePurgeReport.isEmpty() && databasePurgeReport.isEmpty();
 }
}
origin: camunda/camunda-bpm-platform

/**
 * Ensures that the deployment cache is empty after a test. If not the cache
 * will be cleared.
 *
 * @param processEngine the {@link ProcessEngine} to test
 * @param fail if true the method will throw an {@link AssertionError} if the deployment cache is not clean
 * @return the deployment cache summary if fail is set to false or null if deployment cache was clean
 * @throws AssertionError if the deployment cache was not clean and fail is set to true
 */
public static String assertAndEnsureCleanDeploymentCache(ProcessEngine processEngine, boolean fail) {
 StringBuilder outputMessage = new StringBuilder();
 ProcessEngineConfigurationImpl processEngineConfiguration = ((ProcessEngineImpl) processEngine).getProcessEngineConfiguration();
 CachePurgeReport cachePurgeReport = processEngineConfiguration.getDeploymentCache().purgeCache();
 outputMessage.append(cachePurgeReport.getPurgeReportAsString());
 if (outputMessage.length() > 0) {
  outputMessage.insert(0, "Deployment cache not clean:\n");
  LOG.error(outputMessage.toString());
  if (fail) {
   Assert.fail(outputMessage.toString());
  }
  return outputMessage.toString();
 }
 else {
  LOG.debug("Deployment cache was clean");
  return null;
 }
}
origin: camunda/camunda-bpm-platform

if (!cachePurgeReport.isEmpty()) {
 message.append("Deployment cache is not clean:\n")
     .append(cachePurgeReport.getPurgeReportAsString());
} else {
 LOG.debug("Deployment cache was clean.");
origin: camunda/camunda-bpm-platform

@Override
public String getPurgeReportAsString() {
 StringBuilder builder = new StringBuilder();
 for (String key : deletedCache.keySet()) {
  builder.append("Cache: ").append(key)
      .append(" contains: ").append(getReportValue(key))
      .append("\n");
 }
 return builder.toString();
}
origin: org.camunda.bpm/camunda-engine

public CachePurgeReport purgeCache() {
 CachePurgeReport result = new CachePurgeReport();
 Cache<String, ProcessDefinitionEntity> processDefinitionCache = getProcessDefinitionCache();
 if (!processDefinitionCache.isEmpty()) {
  result.addPurgeInformation(CachePurgeReport.PROCESS_DEF_CACHE, processDefinitionCache.keySet());
  processDefinitionCache.clear();
  result.addPurgeInformation(CachePurgeReport.BPMN_MODEL_INST_CACHE, bpmnModelInstanceCache.keySet());
  bpmnModelInstanceCache.clear();
  result.addPurgeInformation(CachePurgeReport.CASE_DEF_CACHE, caseDefinitionCache.keySet());
  caseDefinitionCache.clear();
  result.addPurgeInformation(CachePurgeReport.CASE_MODEL_INST_CACHE, cmmnModelInstanceCache.keySet());
  cmmnModelInstanceCache.clear();
  result.addPurgeInformation(CachePurgeReport.DMN_DEF_CACHE, decisionDefinitionCache.keySet());
  decisionDefinitionCache.clear();
  result.addPurgeInformation(CachePurgeReport.DMN_MODEL_INST_CACHE, dmnModelInstanceCache.keySet());
  dmnModelInstanceCache.clear();
  result.addPurgeInformation(CachePurgeReport.DMN_REQ_DEF_CACHE, decisionRequirementsDefinitionCache.keySet());
  decisionRequirementsDefinitionCache.clear();
origin: org.camunda.bpm/camunda-engine

 public boolean isEmpty() {
  return cachePurgeReport.isEmpty() && databasePurgeReport.isEmpty();
 }
}
origin: org.camunda.bpm/camunda-engine

/**
 * Ensures that the deployment cache is empty after a test. If not the cache
 * will be cleared.
 *
 * @param processEngine the {@link ProcessEngine} to test
 * @param fail if true the method will throw an {@link AssertionError} if the deployment cache is not clean
 * @return the deployment cache summary if fail is set to false or null if deployment cache was clean
 * @throws AssertionError if the deployment cache was not clean and fail is set to true
 */
public static String assertAndEnsureCleanDeploymentCache(ProcessEngine processEngine, boolean fail) {
 StringBuilder outputMessage = new StringBuilder();
 ProcessEngineConfigurationImpl processEngineConfiguration = ((ProcessEngineImpl) processEngine).getProcessEngineConfiguration();
 CachePurgeReport cachePurgeReport = processEngineConfiguration.getDeploymentCache().purgeCache();
 outputMessage.append(cachePurgeReport.getPurgeReportAsString());
 if (outputMessage.length() > 0) {
  outputMessage.insert(0, "Deployment cache not clean:\n");
  LOG.error(outputMessage.toString());
  if (fail) {
   Assert.fail(outputMessage.toString());
  }
  return outputMessage.toString();
 }
 else {
  LOG.debug("Deployment cache was clean");
  return null;
 }
}
origin: camunda/camunda-bpm-platform

if (!cachePurgeReport.isEmpty()) {
 message.append("Deployment cache is not clean:\n")
     .append(cachePurgeReport.getPurgeReportAsString());
} else {
 LOG.debug("Deployment cache was clean.");
origin: org.camunda.bpm/camunda-engine

@Override
public String getPurgeReportAsString() {
 StringBuilder builder = new StringBuilder();
 for (String key : deletedCache.keySet()) {
  builder.append("Cache: ").append(key)
      .append(" contains: ").append(getReportValue(key))
      .append("\n");
 }
 return builder.toString();
}
origin: org.camunda.bpm/camunda-engine

if (!cachePurgeReport.isEmpty()) {
 message.append("Deployment cache is not clean:\n")
     .append(cachePurgeReport.getPurgeReportAsString());
} else {
 LOG.debug("Deployment cache was clean.");
origin: camunda/camunda-bpm-platform

assertEquals(2, cachePurgeReport.getReportValue(CachePurgeReport.DMN_DEF_CACHE).size());
assertEquals(1, cachePurgeReport.getReportValue(CachePurgeReport.DMN_REQ_DEF_CACHE).size());
origin: camunda/camunda-bpm-platform

assertEquals(1, cachePurgeReport.getReportValue(CachePurgeReport.CASE_DEF_CACHE).size());
origin: camunda/camunda-bpm-platform

assertEquals(1, cachePurgeReport.getReportValue(CachePurgeReport.PROCESS_DEF_CACHE).size());
origin: org.camunda.bpm/camunda-engine

assertEquals(2, cachePurgeReport.getReportValue(CachePurgeReport.DMN_DEF_CACHE).size());
assertEquals(1, cachePurgeReport.getReportValue(CachePurgeReport.DMN_REQ_DEF_CACHE).size());
org.camunda.bpm.engine.impl.persistence.deploy.cacheCachePurgeReport

Most used methods

  • getPurgeReportAsString
  • getReportValue
  • isEmpty
  • <init>
  • addPurgeInformation

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onRequestPermissionsResult (Fragment)
  • setScale (BigDecimal)
  • startActivity (Activity)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Option (scala)
  • 21 Best Atom Packages for 2021
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