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

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

Best Java code snippets using org.springframework.batch.core.step.item.ChunkProcessor (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.itemChunkProcessor

Javadoc

Interface defined for processing Chunks.

Most used methods

  • process

Popular in Java

  • Reactive rest calls using spring rest template
  • getContentResolver (Context)
  • findViewById (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Kernel (java.awt.image)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Option (scala)
  • From CI to AI: The AI layer in your organization
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