移除多余字段

This commit is contained in:
648540858
2022-03-11 11:22:47 +08:00
parent 5cfaad2d6d
commit 1c95f1b4aa
7 changed files with 16 additions and 101 deletions

View File

@@ -204,18 +204,8 @@ public interface IRedisCatchStorage {
void resetAllSN();
void updateSubscribe(String key, SubscribeInfo subscribeInfo);
SubscribeInfo getSubscribe(String key);
void delSubscribe(String key);
MediaItem getStreamInfo(String app, String streamId, String mediaServerId);
List<SubscribeInfo> getAllSubscribe();
List<String> getAllSubscribePlatform();
void addCpuInfo(double cpuInfo);
void addMemInfo(double memInfo);

View File

@@ -490,21 +490,6 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
return (GPSMsgInfo)redis.get(key);
}
@Override
public void updateSubscribe(String key, SubscribeInfo subscribeInfo) {
redis.set(key, subscribeInfo, subscribeInfo.getExpires());
}
@Override
public SubscribeInfo getSubscribe(String key) {
return (SubscribeInfo)redis.get(key);
}
@Override
public void delSubscribe(String key) {
redis.del(key);
}
@Override
public List<GPSMsgInfo> getAllGpsMsgInfo() {
String scanKey = VideoManagerConstants.WVP_STREAM_GPS_MSG_PREFIX + userSetup.getServerId() + "_*";
@@ -535,32 +520,6 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
return result;
}
@Override
public List<SubscribeInfo> getAllSubscribe() {
String scanKey = VideoManagerConstants.SIP_SUBSCRIBE_PREFIX + userSetup.getServerId() + "_Catalog_*";
List<SubscribeInfo> result = new ArrayList<>();
List<Object> keys = redis.scan(scanKey);
for (int i = 0; i < keys.size(); i++) {
String key = (String) keys.get(i);
SubscribeInfo subscribeInfo = (SubscribeInfo) redis.get(key);
result.add(subscribeInfo);
}
return result;
}
@Override
public List<String> getAllSubscribePlatform() {
String scanKey = VideoManagerConstants.SIP_SUBSCRIBE_PREFIX + userSetup.getServerId() + "_Catalog_*";
List<String> result = new ArrayList<>();
List<Object> keys = redis.scan(scanKey);
for (int i = 0; i < keys.size(); i++) {
String key = (String) keys.get(i);
String platformId = key.substring(scanKey.length() - 1);
result.add(platformId);
}
return result;
}
@Override
public void addCpuInfo(double cpuInfo) {
String key = VideoManagerConstants.SYSTEM_INFO_CPU_PREFIX + userSetup.getServerId();