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

  • Updating database using SQL prepared statement
  • setContentView (Activity)
  • scheduleAtFixedRate (Timer)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • 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