|
|
|
@ -19,14 +19,15 @@ import com.google.common.util.concurrent.SettableFuture; |
|
|
|
import lombok.Data; |
|
|
|
import org.thingsboard.server.gen.edge.v1.DownlinkMsg; |
|
|
|
|
|
|
|
import java.util.concurrent.ConcurrentHashMap; |
|
|
|
import java.util.concurrent.ConcurrentMap; |
|
|
|
import java.util.Collections; |
|
|
|
import java.util.LinkedHashMap; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.concurrent.ScheduledFuture; |
|
|
|
|
|
|
|
@Data |
|
|
|
public class EdgeSessionState { |
|
|
|
|
|
|
|
private final ConcurrentMap<Integer, DownlinkMsg> pendingMsgsMap = new ConcurrentHashMap<>(); |
|
|
|
private final Map<Integer, DownlinkMsg> pendingMsgsMap = Collections.synchronizedMap(new LinkedHashMap<>()); |
|
|
|
private SettableFuture<Void> sendDownlinkMsgsFuture; |
|
|
|
private ScheduledFuture<?> scheduledSendDownlinkTask; |
|
|
|
} |
|
|
|
|