类 ClassifierCompositeItemWriter<T>

  • 所有已实现的接口:
    ItemWriter<T>

    public class ClassifierCompositeItemWriter<T>
    extends java.lang.Object
    implements ItemWriter<T>
    Calls one of a collection of ItemWriters for each item, based on a router pattern implemented through the provided Classifier. The implementation is thread-safe if all delegates are thread-safe.
    从以下版本开始:
    2.0
    作者:
    Dave Syer, Glenn Renfro
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型方法说明
      voidsetClassifier​(org.springframework.classify.Classifier<T,​ItemWriter<? super T>> classifier) 
      voidwrite​(java.util.List<? extends T> items)
      Delegates to injected ItemWriter instances according to their classification by the Classifier.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 方法详细资料

      • setClassifier

        public void setClassifier​(org.springframework.classify.Classifier<T,​ItemWriter<? super T>> classifier)
        参数:
        classifier - the classifier to set
      • write

        public void write​(java.util.List<? extends T> items)
                   throws java.lang.Exception
        Delegates to injected ItemWriter instances according to their classification by the Classifier.
        指定者:
        write 在接口中 ItemWriter<T>
        参数:
        items - items to be written
        抛出:
        java.lang.Exception - if there are errors. The framework will catch the exception and convert or rethrow it as appropriate.