All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.epam.reportportal.calculation.RetryProcessing Maven / Gradle / Ivy

There is a newer version: 5.13.0
Show newest version
package com.epam.reportportal.calculation;

import org.springframework.scheduling.TaskScheduler;
import org.springframework.util.CollectionUtils;

import java.util.List;

/**
 * Class for retrying batching, possible Object will be converted to some specific object
 */
public class RetryProcessing extends BatchProcessing {

    public RetryProcessing(int batchSize, long timeout, TaskScheduler scheduler) {
        super(batchSize, timeout, scheduler);
    }

    @Override
    protected void process(List objectList) {
        if (CollectionUtils.isEmpty(objectList)) {
            System.out.println("Collection is empty");
        } else {
            System.out.println("Processing...");
            objectList.forEach(System.out::println);
        }
    }
}