Tabnine Logo
ChunkProcessor.process
Code IndexAdd Tabnine to your IDE (free)

How to use
process
method
in
org.springframework.batch.core.step.item.ChunkProcessor

Best Java code snippets using org.springframework.batch.core.step.item.ChunkProcessor.process (Showing top 6 results out of 315)

origin: spring-projects/spring-batch

Throwable failure = null;
try {
  chunkProcessor.process(stepContribution, chunk);
origin: spring-projects/spring-batch

@Override
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
  @SuppressWarnings("unchecked")
  Chunk<I> inputs = (Chunk<I>) chunkContext.getAttribute(INPUTS_KEY);
  if (inputs == null) {
    inputs = chunkProvider.provide(contribution);
    if (buffering) {
      chunkContext.setAttribute(INPUTS_KEY, inputs);
    }
  }
  chunkProcessor.process(contribution, inputs);
  chunkProvider.postProcess(contribution, inputs);
  // Allow a message coming back from the processor to say that we
  // are not done yet
  if (inputs.isBusy()) {
    logger.debug("Inputs still busy");
    return RepeatStatus.CONTINUABLE;
  }
  chunkContext.removeAttribute(INPUTS_KEY);
  chunkContext.setComplete();
  if (logger.isDebugEnabled()) {
    logger.debug("Inputs not busy, ended: " + inputs.isEnd());
  }
  return RepeatStatus.continueIf(!inputs.isEnd());
}
origin: apache/servicemix-bundles

@Override
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
  @SuppressWarnings("unchecked")
  Chunk<I> inputs = (Chunk<I>) chunkContext.getAttribute(INPUTS_KEY);
  if (inputs == null) {
    inputs = chunkProvider.provide(contribution);
    if (buffering) {
      chunkContext.setAttribute(INPUTS_KEY, inputs);
    }
  }
  chunkProcessor.process(contribution, inputs);
  chunkProvider.postProcess(contribution, inputs);
  // Allow a message coming back from the processor to say that we
  // are not done yet
  if (inputs.isBusy()) {
    logger.debug("Inputs still busy");
    return RepeatStatus.CONTINUABLE;
  }
  chunkContext.removeAttribute(INPUTS_KEY);
  chunkContext.setComplete();
  if (logger.isDebugEnabled()) {
    logger.debug("Inputs not busy, ended: " + inputs.isEnd());
  }
  return RepeatStatus.continueIf(!inputs.isEnd());
}
origin: org.springframework.batch/spring-batch-core

@Override
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
  @SuppressWarnings("unchecked")
  Chunk<I> inputs = (Chunk<I>) chunkContext.getAttribute(INPUTS_KEY);
  if (inputs == null) {
    inputs = chunkProvider.provide(contribution);
    if (buffering) {
      chunkContext.setAttribute(INPUTS_KEY, inputs);
    }
  }
  chunkProcessor.process(contribution, inputs);
  chunkProvider.postProcess(contribution, inputs);
  // Allow a message coming back from the processor to say that we
  // are not done yet
  if (inputs.isBusy()) {
    logger.debug("Inputs still busy");
    return RepeatStatus.CONTINUABLE;
  }
  chunkContext.removeAttribute(INPUTS_KEY);
  chunkContext.setComplete();
  if (logger.isDebugEnabled()) {
    logger.debug("Inputs not busy, ended: " + inputs.isEnd());
  }
  return RepeatStatus.continueIf(!inputs.isEnd());
}
origin: org.springframework.batch/org.springframework.batch.core

public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
  @SuppressWarnings("unchecked")
  Chunk<I> inputs = (Chunk<I>) chunkContext.getAttribute(INPUTS_KEY);
  if (inputs == null) {
    inputs = chunkProvider.provide(contribution);
    if (buffering) {
      chunkContext.setAttribute(INPUTS_KEY, inputs);
    }
  }
  chunkProcessor.process(contribution, inputs);
  chunkProvider.postProcess(contribution, inputs);
  // Allow a message coming back from the processor to say that we
  // are not done yet
  if (inputs.isBusy()) {
    logger.debug("Inputs still busy");
    return RepeatStatus.CONTINUABLE;
  }
  chunkContext.removeAttribute(INPUTS_KEY);
  chunkContext.setComplete();
  logger.debug("Inputs not busy, ended: "+inputs.isEnd());
  return RepeatStatus.continueIf(!inputs.isEnd());
}
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

@Override
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
  @SuppressWarnings("unchecked")
  Chunk<I> inputs = (Chunk<I>) chunkContext.getAttribute(INPUTS_KEY);
  if (inputs == null) {
    inputs = chunkProvider.provide(contribution);
    if (buffering) {
      chunkContext.setAttribute(INPUTS_KEY, inputs);
    }
  }
  chunkProcessor.process(contribution, inputs);
  chunkProvider.postProcess(contribution, inputs);
  // Allow a message coming back from the processor to say that we
  // are not done yet
  if (inputs.isBusy()) {
    logger.debug("Inputs still busy");
    return RepeatStatus.CONTINUABLE;
  }
  chunkContext.removeAttribute(INPUTS_KEY);
  chunkContext.setComplete();
  logger.debug("Inputs not busy, ended: " + inputs.isEnd());
  return RepeatStatus.continueIf(!inputs.isEnd());
}
org.springframework.batch.core.step.itemChunkProcessorprocess

Popular methods of ChunkProcessor

    Popular in Java

    • Making http post requests using okhttp
    • addToBackStack (FragmentTransaction)
    • setContentView (Activity)
    • findViewById (Activity)
    • Pointer (com.sun.jna)
      An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
    • PriorityQueue (java.util)
      A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
    • JButton (javax.swing)
    • Logger (org.apache.log4j)
      This is the central class in the log4j package. Most logging operations, except configuration, are d
    • Logger (org.slf4j)
      The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
    • Option (scala)
    • Top 12 Jupyter Notebook extensions
    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