mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-16 10:37:49 +08:00
提升Catalog查询回复处理速度
This commit is contained in:
parent
22fcab375f
commit
16b1bf6819
@ -257,4 +257,20 @@ public class CatalogDataManager implements CommandLineRunner {
|
||||
catalogData.setErrorMsg(errorMsg);
|
||||
catalogData.setTime(Instant.now());
|
||||
}
|
||||
|
||||
public int size(String deviceId) {
|
||||
CatalogData catalogData = dataMap.get(deviceId);
|
||||
if (catalogData == null) {
|
||||
return 0;
|
||||
}
|
||||
return catalogData.getRedisKeysForChannel().size();
|
||||
}
|
||||
|
||||
public int sumNum(String deviceId) {
|
||||
CatalogData catalogData = dataMap.get(deviceId);
|
||||
if (catalogData == null) {
|
||||
return 0;
|
||||
}
|
||||
return catalogData.getTotal();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user