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

How to use
NeverSkipItemSkipPolicy
in
org.springframework.batch.core.step.skip

Best Java code snippets using org.springframework.batch.core.step.skip.NeverSkipItemSkipPolicy (Showing top 11 results out of 315)

origin: spring-projects/spring-batch

/**
 * Setter for policy map. This property should not be changed dynamically -
 * set it once, e.g. in configuration, and then don't change it during a
 * running application. Either this property or the exception classifier
 * directly should be set, but not both.
 *
 * @param policyMap a map of String to {@link SkipPolicy} that will be used
 * to create a {@link Classifier} to locate a policy.
 */
public void setPolicyMap(Map<Class<? extends Throwable>, SkipPolicy> policyMap) {
  SubclassClassifier<Throwable, SkipPolicy> subclassClassifier = new SubclassClassifier<>(
      policyMap, new NeverSkipItemSkipPolicy());
  this.classifier = subclassClassifier;
}
origin: spring-projects/spring-batch

/**
 * Wrap a {@link SkipPolicy} and make it consistent with known fatal exceptions.
 *
 * @param skipPolicy an existing skip policy
 * @return a skip policy that will not skip fatal exceptions
 */
protected SkipPolicy getFatalExceptionAwareProxy(SkipPolicy skipPolicy) {
  NeverSkipItemSkipPolicy neverSkipPolicy = new NeverSkipItemSkipPolicy();
  Map<Class<? extends Throwable>, SkipPolicy> map = new HashMap<>();
  for (Class<? extends Throwable> fatal : nonSkippableExceptionClasses) {
    map.put(fatal, neverSkipPolicy);
  }
  SubclassClassifier<Throwable, SkipPolicy> classifier = new SubclassClassifier<>(skipPolicy);
  classifier.setTypeMap(map);
  ExceptionClassifierSkipPolicy skipPolicyWrapper = new ExceptionClassifierSkipPolicy();
  skipPolicyWrapper.setExceptionClassifier(classifier);
  return skipPolicyWrapper;
}
origin: org.springframework.batch/spring-batch-core

/**
 * Setter for policy map. This property should not be changed dynamically -
 * set it once, e.g. in configuration, and then don't change it during a
 * running application. Either this property or the exception classifier
 * directly should be set, but not both.
 *
 * @param policyMap a map of String to {@link SkipPolicy} that will be used
 * to create a {@link Classifier} to locate a policy.
 */
public void setPolicyMap(Map<Class<? extends Throwable>, SkipPolicy> policyMap) {
  SubclassClassifier<Throwable, SkipPolicy> subclassClassifier = new SubclassClassifier<Throwable, SkipPolicy>(
      policyMap, new NeverSkipItemSkipPolicy());
  this.classifier = subclassClassifier;
}
origin: org.springframework.batch/org.springframework.batch.core

/**
 * Setter for policy map. This property should not be changed dynamically -
 * set it once, e.g. in configuration, and then don't change it during a
 * running application. Either this property or the exception classifier
 * directly should be set, but not both.
 * 
 * @param policyMap a map of String to {@link SkipPolicy} that will be used
 * to create a {@link Classifier} to locate a policy.
 */
public void setPolicyMap(Map<Class<? extends Throwable>, SkipPolicy> policyMap) {
  SubclassClassifier<Throwable, SkipPolicy> subclassClassifier = new SubclassClassifier<Throwable, SkipPolicy>(
      policyMap, new NeverSkipItemSkipPolicy());
  this.classifier = subclassClassifier;
}
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

/**
 * Setter for policy map. This property should not be changed dynamically -
 * set it once, e.g. in configuration, and then don't change it during a
 * running application. Either this property or the exception classifier
 * directly should be set, but not both.
 *
 * @param policyMap a map of String to {@link SkipPolicy} that will be used
 * to create a {@link Classifier} to locate a policy.
 */
public void setPolicyMap(Map<Class<? extends Throwable>, SkipPolicy> policyMap) {
  SubclassClassifier<Throwable, SkipPolicy> subclassClassifier = new SubclassClassifier<Throwable, SkipPolicy>(
      policyMap, new NeverSkipItemSkipPolicy());
  this.classifier = subclassClassifier;
}
origin: apache/servicemix-bundles

/**
 * Setter for policy map. This property should not be changed dynamically -
 * set it once, e.g. in configuration, and then don't change it during a
 * running application. Either this property or the exception classifier
 * directly should be set, but not both.
 *
 * @param policyMap a map of String to {@link SkipPolicy} that will be used
 * to create a {@link Classifier} to locate a policy.
 */
public void setPolicyMap(Map<Class<? extends Throwable>, SkipPolicy> policyMap) {
  SubclassClassifier<Throwable, SkipPolicy> subclassClassifier = new SubclassClassifier<Throwable, SkipPolicy>(
      policyMap, new NeverSkipItemSkipPolicy());
  this.classifier = subclassClassifier;
}
origin: org.springframework.batch/spring-batch-core

/**
 * Wrap a {@link SkipPolicy} and make it consistent with known fatal exceptions.
 *
 * @param skipPolicy an existing skip policy
 * @return a skip policy that will not skip fatal exceptions
 */
protected SkipPolicy getFatalExceptionAwareProxy(SkipPolicy skipPolicy) {
  NeverSkipItemSkipPolicy neverSkipPolicy = new NeverSkipItemSkipPolicy();
  Map<Class<? extends Throwable>, SkipPolicy> map = new HashMap<Class<? extends Throwable>, SkipPolicy>();
  for (Class<? extends Throwable> fatal : nonSkippableExceptionClasses) {
    map.put(fatal, neverSkipPolicy);
  }
  SubclassClassifier<Throwable, SkipPolicy> classifier = new SubclassClassifier<Throwable, SkipPolicy>(skipPolicy);
  classifier.setTypeMap(map);
  ExceptionClassifierSkipPolicy skipPolicyWrapper = new ExceptionClassifierSkipPolicy();
  skipPolicyWrapper.setExceptionClassifier(classifier);
  return skipPolicyWrapper;
}
origin: apache/servicemix-bundles

/**
 * Wrap a {@link SkipPolicy} and make it consistent with known fatal exceptions.
 *
 * @param skipPolicy an existing skip policy
 * @return a skip policy that will not skip fatal exceptions
 */
protected SkipPolicy getFatalExceptionAwareProxy(SkipPolicy skipPolicy) {
  NeverSkipItemSkipPolicy neverSkipPolicy = new NeverSkipItemSkipPolicy();
  Map<Class<? extends Throwable>, SkipPolicy> map = new HashMap<Class<? extends Throwable>, SkipPolicy>();
  for (Class<? extends Throwable> fatal : nonSkippableExceptionClasses) {
    map.put(fatal, neverSkipPolicy);
  }
  SubclassClassifier<Throwable, SkipPolicy> classifier = new SubclassClassifier<Throwable, SkipPolicy>(skipPolicy);
  classifier.setTypeMap(map);
  ExceptionClassifierSkipPolicy skipPolicyWrapper = new ExceptionClassifierSkipPolicy();
  skipPolicyWrapper.setExceptionClassifier(classifier);
  return skipPolicyWrapper;
}
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

/**
 * Wrap a {@link SkipPolicy} and make it consistent with known fatal exceptions.
 *
 * @param skipPolicy an existing skip policy
 * @return a skip policy that will not skip fatal exceptions
 */
protected SkipPolicy getFatalExceptionAwareProxy(SkipPolicy skipPolicy) {
  NeverSkipItemSkipPolicy neverSkipPolicy = new NeverSkipItemSkipPolicy();
  Map<Class<? extends Throwable>, SkipPolicy> map = new HashMap<Class<? extends Throwable>, SkipPolicy>();
  for (Class<? extends Throwable> fatal : nonSkippableExceptionClasses) {
    map.put(fatal, neverSkipPolicy);
  }
  SubclassClassifier<Throwable, SkipPolicy> classifier = new SubclassClassifier<Throwable, SkipPolicy>(skipPolicy);
  classifier.setTypeMap(map);
  ExceptionClassifierSkipPolicy skipPolicyWrapper = new ExceptionClassifierSkipPolicy();
  skipPolicyWrapper.setExceptionClassifier(classifier);
  return skipPolicyWrapper;
}
origin: org.springframework.batch/org.springframework.batch.core

/**
 * Wrap a {@link SkipPolicy} and make it consistent with known fatal
 * exceptions.
 * 
 * @param skipPolicy an existing skip policy
 * @return a skip policy that will not skip fatal exceptions
 */
private SkipPolicy getFatalExceptionAwareProxy(SkipPolicy skipPolicy) {
  NeverSkipItemSkipPolicy neverSkipPolicy = new NeverSkipItemSkipPolicy();
  Map<Class<? extends Throwable>, SkipPolicy> map = new HashMap<Class<? extends Throwable>, SkipPolicy>();
  for (Class<? extends Throwable> fatal : nonSkippableExceptionClasses) {
    map.put(fatal, neverSkipPolicy);
  }
  SubclassClassifier<Throwable, SkipPolicy> classifier = new SubclassClassifier<Throwable, SkipPolicy>(skipPolicy);
  classifier.setTypeMap(map);
  ExceptionClassifierSkipPolicy skipPolicyWrapper = new ExceptionClassifierSkipPolicy();
  skipPolicyWrapper.setExceptionClassifier(classifier);
  return skipPolicyWrapper;
}
origin: pl.edu.icm.synat/synat-core-services-impl

Map<Class<? extends Throwable>, SkipPolicy> policyMap = new HashMap<>();
policyMap.put(Throwable.class, new AlwaysSkipItemSkipPolicy());
policyMap.put(JobInterruptedException.class, new NeverSkipItemSkipPolicy());
skipPolicy.setPolicyMap(policyMap);
Classifier<Throwable, Boolean> rollbackClassifier;
org.springframework.batch.core.step.skipNeverSkipItemSkipPolicy

Javadoc

SkipPolicy implementation that always returns false, indicating that an item should not be skipped.

Most used methods

  • <init>

Popular in Java

  • Start an intent from android
  • requestLocationUpdates (LocationManager)
  • setScale (BigDecimal)
  • getSystemService (Context)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JPanel (javax.swing)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top plugins for WebStorm
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