package com.heyu.api.data.utils;

import lombok.Data;

import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.Future;

@Data
public class AsynRunDTO {


    private Map<String, Future<R>> map;



    public void run(){
        Map<String,Object> data = new HashMap<>();
        map.forEach((key, future) -> Optional.ofNullable(SanUtils.get(future)).ifPresent(osResp -> {
            data.put(key, osResp);
        }));
    }
}
