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

How to use
Chunk$ChunkIterator
in
org.springframework.batch.core.step.item

Best Java code snippets using org.springframework.batch.core.step.item.Chunk$ChunkIterator (Showing top 20 results out of 315)

origin: spring-projects/spring-batch

for (final Chunk<I>.ChunkIterator iterator = inputs.iterator(); iterator.hasNext();) {
  final I item = iterator.next();
origin: spring-projects/spring-batch

  if (outputIterator.hasNext()) {
    outputIterator.remove();
    return;
List<O> items = Collections.singletonList(outputIterator.next());
inputIterator.next();
try {
  writeItems(items);
  inputIterator.remove();
  outputIterator.remove();
      inputIterator.remove();
      outputIterator.remove();
origin: apache/servicemix-bundles

for (final Chunk<I>.ChunkIterator iterator = inputs.iterator(); iterator.hasNext();) {
  final I item = iterator.next();
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

for (final Chunk<I>.ChunkIterator iterator = inputs.iterator(); iterator.hasNext();) {
  final I item = iterator.next();
origin: org.springframework.batch/spring-batch-core

for (final Chunk<I>.ChunkIterator iterator = inputs.iterator(); iterator.hasNext();) {
  final I item = iterator.next();
origin: org.springframework.batch/org.springframework.batch.core

final AtomicInteger count = new AtomicInteger(0);
for (final Chunk<I>.ChunkIterator iterator = inputs.iterator(); iterator.hasNext();) {
  final I item = iterator.next();
origin: apache/servicemix-bundles

  if (outputIterator.hasNext()) {
    outputIterator.remove();
    return;
List<O> items = Collections.singletonList(outputIterator.next());
inputIterator.next();
try {
  writeItems(items);
  inputIterator.remove();
  outputIterator.remove();
      inputIterator.remove();
      outputIterator.remove();
origin: org.springframework.batch/spring-batch-core

  if (outputIterator.hasNext()) {
    outputIterator.remove();
    return;
List<O> items = Collections.singletonList(outputIterator.next());
inputIterator.next();
try {
  writeItems(items);
  inputIterator.remove();
  outputIterator.remove();
      inputIterator.remove();
      outputIterator.remove();
origin: org.springframework.batch/org.springframework.batch.core

iterator.remove();
data.incrementFilterCount();
origin: apache/servicemix-bundles

iterator.remove();
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

Chunk<O>.ChunkIterator outputIterator = outputs.iterator();
List<O> items = Collections.singletonList(outputIterator.next());
inputIterator.next();
try {
  writeItems(items);
  inputIterator.remove();
  outputIterator.remove();
    inputIterator.remove();
    outputIterator.remove();
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

iterator.remove();
origin: org.springframework.batch/spring-batch-core

iterator.remove();
origin: org.springframework.batch/org.springframework.batch.core

Chunk<O>.ChunkIterator outputIterator = outputs.iterator();
List<O> items = Collections.singletonList(outputIterator.next());
inputIterator.next();
try {
  writeItems(items);
  inputIterator.remove();
  outputIterator.remove();
    inputIterator.remove();
    outputIterator.remove();
origin: apache/servicemix-bundles

private void checkSkipPolicy(Chunk<I>.ChunkIterator inputIterator, Chunk<O>.ChunkIterator outputIterator,
    Throwable e, StepContribution contribution, boolean recovery) throws Exception {
  logger.debug("Checking skip policy after failed write");
  if (shouldSkip(itemWriteSkipPolicy, e, contribution.getStepSkipCount())) {
    contribution.incrementWriteSkipCount();
    inputIterator.remove();
    outputIterator.remove(e);
    logger.debug("Skipping after failed write", e);
  }
  else {
    if (recovery) {
      // Only if already recovering should we check skip policy
      throw new RetryException("Non-skippable exception in recoverer", e);
    }
    else {
      if (e instanceof Exception) {
        throw (Exception) e;
      }
      else if (e instanceof Error) {
        throw (Error) e;
      }
      else {
        throw new RetryException("Non-skippable throwable in recoverer", e);
      }
    }
  }
}
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

private void checkSkipPolicy(Chunk<I>.ChunkIterator inputIterator, Chunk<O>.ChunkIterator outputIterator,
    Throwable e, StepContribution contribution, boolean recovery) throws Exception {
  logger.debug("Checking skip policy after failed write");
  if (shouldSkip(itemWriteSkipPolicy, e, contribution.getStepSkipCount())) {
    contribution.incrementWriteSkipCount();
    inputIterator.remove();
    outputIterator.remove(e);
    logger.debug("Skipping after failed write", e);
  }
  else {
    if (recovery) {
      // Only if already recovering should we check skip policy
      throw new RetryException("Non-skippable exception in recoverer", e);
    }
    else {
      if (e instanceof Exception) {
        throw (Exception) e;
      }
      else if (e instanceof Error) {
        throw (Error) e;
      }
      else {
        throw new RetryException("Non-skippable throwable in recoverer", e);
      }
    }
  }
}
origin: org.springframework.batch/spring-batch-core

private void checkSkipPolicy(Chunk<I>.ChunkIterator inputIterator, Chunk<O>.ChunkIterator outputIterator,
    Throwable e, StepContribution contribution, boolean recovery) throws Exception {
  logger.debug("Checking skip policy after failed write");
  if (shouldSkip(itemWriteSkipPolicy, e, contribution.getStepSkipCount())) {
    contribution.incrementWriteSkipCount();
    inputIterator.remove();
    outputIterator.remove(e);
    logger.debug("Skipping after failed write", e);
  }
  else {
    if (recovery) {
      // Only if already recovering should we check skip policy
      throw new RetryException("Non-skippable exception in recoverer", e);
    }
    else {
      if (e instanceof Exception) {
        throw (Exception) e;
      }
      else if (e instanceof Error) {
        throw (Error) e;
      }
      else {
        throw new RetryException("Non-skippable throwable in recoverer", e);
      }
    }
  }
}
origin: apache/servicemix-bundles

protected Chunk<O> transform(StepContribution contribution, Chunk<I> inputs) throws Exception {
  Chunk<O> outputs = new Chunk<O>();
  for (Chunk<I>.ChunkIterator iterator = inputs.iterator(); iterator.hasNext();) {
    final I item = iterator.next();
    O output;
    try {
      output = doProcess(item);
    }
    catch (Exception e) {
      /*
       * For a simple chunk processor (no fault tolerance) we are done
       * here, so prevent any more processing of these inputs.
       */
      inputs.clear();
      throw e;
    }
    if (output != null) {
      outputs.add(output);
    }
    else {
      iterator.remove();
    }
  }
  return outputs;
}
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

protected Chunk<O> transform(StepContribution contribution, Chunk<I> inputs) throws Exception {
  Chunk<O> outputs = new Chunk<O>();
  for (Chunk<I>.ChunkIterator iterator = inputs.iterator(); iterator.hasNext();) {
    final I item = iterator.next();
    O output;
    try {
      output = doProcess(item);
    }
    catch (Exception e) {
      /*
       * For a simple chunk processor (no fault tolerance) we are done
       * here, so prevent any more processing of these inputs.
       */
      inputs.clear();
      throw e;
    }
    if (output != null) {
      outputs.add(output);
    }
    else {
      iterator.remove();
    }
  }
  return outputs;
}
origin: apache/servicemix-bundles

@Override
public Object recover(RetryContext context) throws Exception {
  Throwable e = context.getLastThrowable();
  if (outputs.size() > 1 && !rollbackClassifier.classify(e)) {
    throw new RetryException("Invalid retry state during write caused by "
        + "exception that does not classify for rollback: ", e);
  }
  Chunk<I>.ChunkIterator inputIterator = inputs.iterator();
  for (Chunk<O>.ChunkIterator outputIterator = outputs.iterator(); outputIterator.hasNext();) {
    inputIterator.next();
    outputIterator.next();
    checkSkipPolicy(inputIterator, outputIterator, e, contribution, true);
    if (!rollbackClassifier.classify(e)) {
      throw new RetryException(
          "Invalid retry state during recovery caused by exception that does not classify for rollback: ",
          e);
    }
  }
  return null;
}
org.springframework.batch.core.step.itemChunk$ChunkIterator

Most used methods

  • hasNext
  • next
  • remove
  • <init>

Popular in Java

  • Start an intent from android
  • getContentResolver (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Table (org.hibernate.mapping)
    A relational table
  • 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