动态人物管理增加自检机制。防止内存溢出
This commit is contained in:
parent
0f945910f3
commit
6d8569f340
@ -5,6 +5,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@ -120,4 +121,19 @@ public class DynamicTask {
|
||||
public Runnable get(String key) {
|
||||
return runnableMap.get(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* 每五分钟检查失效的任务,并移除
|
||||
*/
|
||||
@Scheduled(cron="0 0/5 * * * ?")
|
||||
public void execute(){
|
||||
if (futureMap.size() > 0) {
|
||||
for (String key : futureMap.keySet()) {
|
||||
if (futureMap.get(key).isDone()) {
|
||||
futureMap.remove(key);
|
||||
runnableMap.remove(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.genersoft.iot.vmp.domain.req;
|
||||
package com.genersoft.iot.vmp.gb28181.bean;
|
||||
|
||||
|
||||
/**
|
@ -1,6 +1,6 @@
|
||||
package com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.response.cmd;
|
||||
|
||||
import com.genersoft.iot.vmp.domain.req.PresetQuerySipReq;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.PresetQuerySipReq;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.*;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage;
|
||||
|
@ -35,15 +35,9 @@ public class MediaController {
|
||||
@Autowired
|
||||
private IRedisCatchStorage redisCatchStorage;
|
||||
|
||||
@Autowired
|
||||
private IStreamPushService streamPushService;
|
||||
|
||||
@Autowired
|
||||
private IMediaService mediaService;
|
||||
|
||||
@Autowired
|
||||
private IMediaServerService mediaServerService;
|
||||
|
||||
|
||||
/**
|
||||
* 根据应用名和流id获取播放地址
|
||||
|
BIN
src/main/resources/8042900_www.wvp-pro.cn.jks
Normal file
BIN
src/main/resources/8042900_www.wvp-pro.cn.jks
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user