com.swak.archiver.executor.impl.AloneArchiveExecutor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swak-datarchiver-boot-starter Show documentation
Show all versions of swak-datarchiver-boot-starter Show documentation
swak component of data archiver spring boot starter
The newest version!
package com.swak.archiver.executor.impl;
import com.google.common.base.Joiner;
import com.google.common.collect.Lists;
import com.swak.archiver.conf.ArchiveConfig;
import com.swak.archiver.conf.ArchiveItem;
import com.swak.common.dto.ListPager;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.transaction.support.TransactionTemplate;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
@Slf4j
public class AloneArchiveExecutor extends AbsArchiveExecutor {
@Override
public void execute(ArchiveItem item) {
// 需要循环递归,达到最大数 或则归档的条数为0
while (item.getProgress().get() < item.getConfig().getProgressSize()) {
try {
List