合并271 notify消息优化
parent
394cf7ee4e
commit
249bdf69be
|
@ -688,18 +688,10 @@ public interface DeviceChannelMapper {
|
||||||
|
|
||||||
@Update({"<script>" +
|
@Update({"<script>" +
|
||||||
"<foreach collection='channels' item='item' separator=';'>" +
|
"<foreach collection='channels' item='item' separator=';'>" +
|
||||||
"UPDATE wvp_device_channel SET status='ON' WHERE device_id=#{item.deviceId}" +
|
"UPDATE wvp_device_channel SET status=#{item.status} WHERE device_id=#{item.deviceId}" +
|
||||||
"</foreach>" +
|
"</foreach>" +
|
||||||
"</script>"})
|
"</script>"})
|
||||||
int batchOnlineForNotify(List<DeviceChannel> channels);
|
int batchUpdateStatus(List<DeviceChannel> channels);
|
||||||
|
|
||||||
@Update({"<script>" +
|
|
||||||
"<foreach collection='channels' item='item' separator=';'>" +
|
|
||||||
"UPDATE wvp_device_channel SET status='OFF' WHERE device_id=#{item.deviceId}" +
|
|
||||||
"</foreach>" +
|
|
||||||
"</script>"})
|
|
||||||
int batchOfflineForNotify(List<DeviceChannel> channels);
|
|
||||||
|
|
||||||
|
|
||||||
@Select("select count(1) from wvp_device_channel where status = 'ON'")
|
@Select("select count(1) from wvp_device_channel where status = 'ON'")
|
||||||
int getOnlineCount();
|
int getOnlineCount();
|
||||||
|
|
|
@ -3,8 +3,8 @@ package com.genersoft.iot.vmp.gb28181.service;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.Device;
|
import com.genersoft.iot.vmp.gb28181.bean.Device;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
|
import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.MobilePosition;
|
import com.genersoft.iot.vmp.gb28181.bean.MobilePosition;
|
||||||
import com.genersoft.iot.vmp.vmanager.bean.ResourceBaseInfo;
|
|
||||||
import com.genersoft.iot.vmp.gb28181.controller.bean.ChannelReduce;
|
import com.genersoft.iot.vmp.gb28181.controller.bean.ChannelReduce;
|
||||||
|
import com.genersoft.iot.vmp.vmanager.bean.ResourceBaseInfo;
|
||||||
import com.genersoft.iot.vmp.web.gb28181.dto.DeviceChannelExtend;
|
import com.genersoft.iot.vmp.web.gb28181.dto.DeviceChannelExtend;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
@ -47,15 +47,7 @@ public interface IDeviceChannelService {
|
||||||
*/
|
*/
|
||||||
int deleteChannelsForNotify(List<DeviceChannel> deleteChannelList);
|
int deleteChannelsForNotify(List<DeviceChannel> deleteChannelList);
|
||||||
|
|
||||||
/**
|
int updateChannelsStatus(List<DeviceChannel> channels);
|
||||||
* 批量上线
|
|
||||||
*/
|
|
||||||
int channelsOnlineForNotify(List<DeviceChannel> channels);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量下线
|
|
||||||
*/
|
|
||||||
int channelsOfflineForNotify(List<DeviceChannel> channels);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取一个通道
|
* 获取一个通道
|
||||||
|
|
|
@ -193,13 +193,45 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int deleteChannelsForNotify(List<DeviceChannel> deleteChannelList) {
|
@Transactional
|
||||||
return channelMapper.batchDelForNotify(deleteChannelList);
|
public int deleteChannelsForNotify(List<DeviceChannel> channels) {
|
||||||
|
int limitCount = 1000;
|
||||||
|
int result = 0;
|
||||||
|
if (!channels.isEmpty()) {
|
||||||
|
if (channels.size() > limitCount) {
|
||||||
|
for (int i = 0; i < channels.size(); i += limitCount) {
|
||||||
|
int toIndex = i + limitCount;
|
||||||
|
if (i + limitCount > channels.size()) {
|
||||||
|
toIndex = channels.size();
|
||||||
|
}
|
||||||
|
result += channelMapper.batchDel(channels.subList(i, toIndex));
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
result += channelMapper.batchDel(channels);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public int channelsOnlineForNotify(List<DeviceChannel> channels) {
|
public int updateChannelsStatus(List<DeviceChannel> channels) {
|
||||||
return channelMapper.batchOnlineForNotify(channels);
|
int limitCount = 1000;
|
||||||
|
int result = 0;
|
||||||
|
if (!channels.isEmpty()) {
|
||||||
|
if (channels.size() > limitCount) {
|
||||||
|
for (int i = 0; i < channels.size(); i += limitCount) {
|
||||||
|
int toIndex = i + limitCount;
|
||||||
|
if (i + limitCount > channels.size()) {
|
||||||
|
toIndex = channels.size();
|
||||||
|
}
|
||||||
|
result += channelMapper.batchUpdateStatus(channels.subList(i, toIndex));
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
result += channelMapper.batchUpdateStatus(channels);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -207,12 +239,6 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
|
||||||
channelMapper.online(channel.getId());
|
channelMapper.online(channel.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int channelsOfflineForNotify(List<DeviceChannel> channels) {
|
|
||||||
return channelMapper.batchOfflineForNotify(channels);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void offline(DeviceChannel channel) {
|
public void offline(DeviceChannel channel) {
|
||||||
channelMapper.offline(channel.getId());
|
channelMapper.offline(channel.getId());
|
||||||
|
@ -242,6 +268,7 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public synchronized void batchUpdateChannelForNotify(List<DeviceChannel> channels) {
|
public synchronized void batchUpdateChannelForNotify(List<DeviceChannel> channels) {
|
||||||
String now = DateUtil.getNow();
|
String now = DateUtil.getNow();
|
||||||
for (DeviceChannel channel : channels) {
|
for (DeviceChannel channel : channels) {
|
||||||
|
@ -264,8 +291,27 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public void batchAddChannel(List<DeviceChannel> channels) {
|
public void batchAddChannel(List<DeviceChannel> channels) {
|
||||||
channelMapper.batchAdd(channels);
|
String now = DateUtil.getNow();
|
||||||
|
for (DeviceChannel channel : channels) {
|
||||||
|
channel.setUpdateTime(now);
|
||||||
|
channel.setCreateTime(now);
|
||||||
|
}
|
||||||
|
int limitCount = 1000;
|
||||||
|
if (!channels.isEmpty()) {
|
||||||
|
if (channels.size() > limitCount) {
|
||||||
|
for (int i = 0; i < channels.size(); i += limitCount) {
|
||||||
|
int toIndex = i + limitCount;
|
||||||
|
if (i + limitCount > channels.size()) {
|
||||||
|
toIndex = channels.size();
|
||||||
|
}
|
||||||
|
channelMapper.batchAdd(channels.subList(i, toIndex));
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
channelMapper.batchAdd(channels);
|
||||||
|
}
|
||||||
|
}
|
||||||
for (DeviceChannel channel : channels) {
|
for (DeviceChannel channel : channels) {
|
||||||
if (channel.getParentId() != null) {
|
if (channel.getParentId() != null) {
|
||||||
channelMapper.updateChannelSubCount(channel.getDeviceDbId(), channel.getParentId());
|
channelMapper.updateChannelSubCount(channel.getDeviceDbId(), channel.getParentId());
|
||||||
|
|
|
@ -39,8 +39,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
@Component
|
@Component
|
||||||
public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent {
|
public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent {
|
||||||
|
|
||||||
private final List<DeviceChannel> updateChannelOnlineList = new CopyOnWriteArrayList<>();
|
private final List<DeviceChannel> updateChannelForStatusChange = new CopyOnWriteArrayList<>();
|
||||||
private final List<DeviceChannel> updateChannelOfflineList = new CopyOnWriteArrayList<>();
|
|
||||||
private final Map<String, DeviceChannel> updateChannelMap = new ConcurrentHashMap<>();
|
private final Map<String, DeviceChannel> updateChannelMap = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
private final Map<String, DeviceChannel> addChannelMap = new ConcurrentHashMap<>();
|
private final Map<String, DeviceChannel> addChannelMap = new ConcurrentHashMap<>();
|
||||||
|
@ -60,6 +59,10 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent
|
||||||
@Autowired
|
@Autowired
|
||||||
private IDeviceChannelService deviceChannelService;
|
private IDeviceChannelService deviceChannelService;
|
||||||
|
|
||||||
|
// @Scheduled(fixedRate = 2000) //每400毫秒执行一次
|
||||||
|
// public void showSize(){
|
||||||
|
// log.warn("[notify-目录订阅] 待处理消息数量: {}", taskQueue.size() );
|
||||||
|
// }
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public void process(RequestEvent evt) {
|
public void process(RequestEvent evt) {
|
||||||
|
@ -75,7 +78,14 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent
|
||||||
if (taskQueue.isEmpty()) {
|
if (taskQueue.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (HandlerCatchData take : taskQueue) {
|
List<HandlerCatchData> handlerCatchDataList = new ArrayList<>();
|
||||||
|
while (!taskQueue.isEmpty()) {
|
||||||
|
handlerCatchDataList.add(taskQueue.poll());
|
||||||
|
}
|
||||||
|
if (handlerCatchDataList.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (HandlerCatchData take : handlerCatchDataList) {
|
||||||
if (take == null) {
|
if (take == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -119,14 +129,17 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent
|
||||||
log.error("[解析CatalogChannelEvent]失败原文: \n{}", new String(evt.getRequest().getRawContent(), Charset.forName(device.getCharset())));
|
log.error("[解析CatalogChannelEvent]失败原文: \n{}", new String(evt.getRequest().getRawContent(), Charset.forName(device.getCharset())));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (log.isDebugEnabled()){
|
||||||
log.info("[收到目录订阅]:{}/{}-{}", device.getDeviceId(),
|
log.debug("[收到目录订阅]:{}/{}-{}", device.getDeviceId(),
|
||||||
catalogChannelEvent.getChannel().getDeviceId(), catalogChannelEvent.getEvent());
|
catalogChannelEvent.getChannel().getDeviceId(), catalogChannelEvent.getEvent());
|
||||||
|
}
|
||||||
|
DeviceChannel channel = catalogChannelEvent.getChannel();
|
||||||
switch (catalogChannelEvent.getEvent()) {
|
switch (catalogChannelEvent.getEvent()) {
|
||||||
case CatalogEvent.ON:
|
case CatalogEvent.ON:
|
||||||
// 上线
|
// 上线
|
||||||
log.info("[收到通道上线通知] 来自设备: {}, 通道 {}", device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId());
|
log.info("[收到通道上线通知] 来自设备: {}, 通道 {}", device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId());
|
||||||
updateChannelOnlineList.add(catalogChannelEvent.getChannel());
|
channel.setStatus("ON");
|
||||||
|
updateChannelForStatusChange.add(channel);
|
||||||
if (userSetting.getDeviceStatusNotify()) {
|
if (userSetting.getDeviceStatusNotify()) {
|
||||||
// 发送redis消息
|
// 发送redis消息
|
||||||
redisCatchStorage.sendDeviceOrChannelStatus(device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId(), true);
|
redisCatchStorage.sendDeviceOrChannelStatus(device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId(), true);
|
||||||
|
@ -138,7 +151,8 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent
|
||||||
if (userSetting.getRefuseChannelStatusChannelFormNotify()) {
|
if (userSetting.getRefuseChannelStatusChannelFormNotify()) {
|
||||||
log.info("[收到通道离线通知] 但是平台已配置拒绝此消息,来自设备: {}, 通道 {}", device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId());
|
log.info("[收到通道离线通知] 但是平台已配置拒绝此消息,来自设备: {}, 通道 {}", device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId());
|
||||||
} else {
|
} else {
|
||||||
updateChannelOfflineList.add(catalogChannelEvent.getChannel());
|
channel.setStatus("OFF");
|
||||||
|
updateChannelForStatusChange.add(channel);
|
||||||
if (userSetting.getDeviceStatusNotify()) {
|
if (userSetting.getDeviceStatusNotify()) {
|
||||||
// 发送redis消息
|
// 发送redis消息
|
||||||
redisCatchStorage.sendDeviceOrChannelStatus(device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId(), false);
|
redisCatchStorage.sendDeviceOrChannelStatus(device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId(), false);
|
||||||
|
@ -151,7 +165,8 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent
|
||||||
if (userSetting.getRefuseChannelStatusChannelFormNotify()) {
|
if (userSetting.getRefuseChannelStatusChannelFormNotify()) {
|
||||||
log.info("[收到通道视频丢失通知] 但是平台已配置拒绝此消息,来自设备: {}, 通道 {}", device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId());
|
log.info("[收到通道视频丢失通知] 但是平台已配置拒绝此消息,来自设备: {}, 通道 {}", device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId());
|
||||||
} else {
|
} else {
|
||||||
updateChannelOfflineList.add(catalogChannelEvent.getChannel());
|
channel.setStatus("OFF");
|
||||||
|
updateChannelForStatusChange.add(channel);
|
||||||
if (userSetting.getDeviceStatusNotify()) {
|
if (userSetting.getDeviceStatusNotify()) {
|
||||||
// 发送redis消息
|
// 发送redis消息
|
||||||
redisCatchStorage.sendDeviceOrChannelStatus(device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId(), false);
|
redisCatchStorage.sendDeviceOrChannelStatus(device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId(), false);
|
||||||
|
@ -164,7 +179,8 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent
|
||||||
if (userSetting.getRefuseChannelStatusChannelFormNotify()) {
|
if (userSetting.getRefuseChannelStatusChannelFormNotify()) {
|
||||||
log.info("[收到通道视频故障通知] 但是平台已配置拒绝此消息,来自设备: {}, 通道 {}", device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId());
|
log.info("[收到通道视频故障通知] 但是平台已配置拒绝此消息,来自设备: {}, 通道 {}", device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId());
|
||||||
} else {
|
} else {
|
||||||
updateChannelOfflineList.add(catalogChannelEvent.getChannel());
|
channel.setStatus("OFF");
|
||||||
|
updateChannelForStatusChange.add(channel);
|
||||||
if (userSetting.getDeviceStatusNotify()) {
|
if (userSetting.getDeviceStatusNotify()) {
|
||||||
// 发送redis消息
|
// 发送redis消息
|
||||||
redisCatchStorage.sendDeviceOrChannelStatus(device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId(), false);
|
redisCatchStorage.sendDeviceOrChannelStatus(device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId(), false);
|
||||||
|
@ -178,7 +194,6 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent
|
||||||
DeviceChannel deviceChannel = deviceChannelService.getOne(deviceId, catalogChannelEvent.getChannel().getDeviceId());
|
DeviceChannel deviceChannel = deviceChannelService.getOne(deviceId, catalogChannelEvent.getChannel().getDeviceId());
|
||||||
if (deviceChannel != null) {
|
if (deviceChannel != null) {
|
||||||
log.info("[增加通道] 已存在,不发送通知只更新,设备: {}, 通道 {}", device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId());
|
log.info("[增加通道] 已存在,不发送通知只更新,设备: {}, 通道 {}", device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId());
|
||||||
DeviceChannel channel = catalogChannelEvent.getChannel();
|
|
||||||
channel.setId(deviceChannel.getId());
|
channel.setId(deviceChannel.getId());
|
||||||
channel.setHasAudio(deviceChannel.isHasAudio());
|
channel.setHasAudio(deviceChannel.isHasAudio());
|
||||||
channel.setUpdateTime(DateUtil.getNow());
|
channel.setUpdateTime(DateUtil.getNow());
|
||||||
|
@ -210,7 +225,6 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent
|
||||||
// 判断此通道是否存在
|
// 判断此通道是否存在
|
||||||
DeviceChannel deviceChannelForUpdate = deviceChannelService.getOne(deviceId, catalogChannelEvent.getChannel().getDeviceId());
|
DeviceChannel deviceChannelForUpdate = deviceChannelService.getOne(deviceId, catalogChannelEvent.getChannel().getDeviceId());
|
||||||
if (deviceChannelForUpdate != null) {
|
if (deviceChannelForUpdate != null) {
|
||||||
DeviceChannel channel = catalogChannelEvent.getChannel();
|
|
||||||
channel.setId(deviceChannelForUpdate.getId());
|
channel.setId(deviceChannelForUpdate.getId());
|
||||||
channel.setHasAudio(deviceChannelForUpdate.isHasAudio());
|
channel.setHasAudio(deviceChannelForUpdate.isHasAudio());
|
||||||
channel.setUpdateTime(DateUtil.getNow());
|
channel.setUpdateTime(DateUtil.getNow());
|
||||||
|
@ -242,8 +256,7 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent
|
||||||
taskQueue.clear();
|
taskQueue.clear();
|
||||||
if (!updateChannelMap.keySet().isEmpty()
|
if (!updateChannelMap.keySet().isEmpty()
|
||||||
|| !addChannelMap.keySet().isEmpty()
|
|| !addChannelMap.keySet().isEmpty()
|
||||||
|| !updateChannelOnlineList.isEmpty()
|
|| !updateChannelForStatusChange.isEmpty()
|
||||||
|| !updateChannelOfflineList.isEmpty()
|
|
||||||
|| !deleteChannelList.isEmpty()) {
|
|| !deleteChannelList.isEmpty()) {
|
||||||
executeSave();
|
executeSave();
|
||||||
}
|
}
|
||||||
|
@ -256,14 +269,9 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent
|
||||||
log.error("[存储收到的增加通道] 异常: ", e );
|
log.error("[存储收到的增加通道] 异常: ", e );
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
executeSaveForOnline();
|
executeSaveForStatus();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("[存储收到的通道上线] 异常: ", e );
|
log.error("[存储收到的通道状态变化] 异常: ", e );
|
||||||
}
|
|
||||||
try {
|
|
||||||
executeSaveForOffline();
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("[存储收到的通道离线] 异常: ", e );
|
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
executeSaveForUpdate();
|
executeSaveForUpdate();
|
||||||
|
@ -301,17 +309,10 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void executeSaveForOnline(){
|
private void executeSaveForStatus(){
|
||||||
if (!updateChannelOnlineList.isEmpty()) {
|
if (!updateChannelForStatusChange.isEmpty()) {
|
||||||
deviceChannelService.channelsOnlineForNotify(updateChannelOnlineList);
|
deviceChannelService.updateChannelsStatus(updateChannelForStatusChange);
|
||||||
updateChannelOnlineList.clear();
|
updateChannelForStatusChange.clear();
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void executeSaveForOffline(){
|
|
||||||
if (!updateChannelOfflineList.isEmpty()) {
|
|
||||||
deviceChannelService.channelsOfflineForNotify(updateChannelOfflineList);
|
|
||||||
updateChannelOfflineList.clear();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@ import org.springframework.util.ObjectUtils;
|
||||||
|
|
||||||
import javax.sip.RequestEvent;
|
import javax.sip.RequestEvent;
|
||||||
import javax.sip.header.FromHeader;
|
import javax.sip.header.FromHeader;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||||
|
|
||||||
|
@ -65,7 +66,14 @@ public class NotifyRequestForMobilePositionProcessor extends SIPRequestProcessor
|
||||||
if (taskQueue.isEmpty()) {
|
if (taskQueue.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (HandlerCatchData take : taskQueue) {
|
List<HandlerCatchData> handlerCatchDataList = new ArrayList<>();
|
||||||
|
while (!taskQueue.isEmpty()) {
|
||||||
|
handlerCatchDataList.add(taskQueue.poll());
|
||||||
|
}
|
||||||
|
if (handlerCatchDataList.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (HandlerCatchData take : handlerCatchDataList) {
|
||||||
if (take == null) {
|
if (take == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue