修复redis查询
This commit is contained in:
@@ -75,7 +75,7 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||
@Override
|
||||
public void resetAllSN() {
|
||||
String scanKey = VideoManagerConstants.SIP_SN_PREFIX + userSetting.getServerId() + "_*";
|
||||
List<Object> keys = RedisUtil.scan(scanKey, null);
|
||||
List<Object> keys = RedisUtil.scan(scanKey);
|
||||
for (Object o : keys) {
|
||||
String key = (String) o;
|
||||
RedisUtil.set(key, 1);
|
||||
@@ -129,7 +129,7 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||
}
|
||||
@Override
|
||||
public StreamInfo queryPlayByStreamId(String streamId) {
|
||||
List<Object> playLeys = RedisUtil.scan(String.format("%S_%s_*_%s_*", VideoManagerConstants.PLAYER_PREFIX, userSetting.getServerId(), streamId), 1);
|
||||
List<Object> playLeys = RedisUtil.scan(String.format("%S_%s_*_%s_*", VideoManagerConstants.PLAYER_PREFIX, userSetting.getServerId(), streamId));
|
||||
if (playLeys == null || playLeys.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
@@ -141,7 +141,7 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||
List<Object> playLeys = RedisUtil.scan(String.format("%S_%s_*_*_%s_%s", VideoManagerConstants.PLAYER_PREFIX,
|
||||
userSetting.getServerId(),
|
||||
deviceId,
|
||||
channelId), 1);
|
||||
channelId));
|
||||
if (playLeys == null || playLeys.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
@@ -278,7 +278,7 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||
stream,
|
||||
callId
|
||||
);
|
||||
List<Object> streamInfoScan = RedisUtil.scan(key, 1);
|
||||
List<Object> streamInfoScan = RedisUtil.scan(key);
|
||||
if (streamInfoScan.size() > 0) {
|
||||
return (StreamInfo) RedisUtil.get((String) streamInfoScan.get(0));
|
||||
}else {
|
||||
@@ -310,7 +310,7 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||
stream,
|
||||
callId
|
||||
);
|
||||
List<Object> streamInfoScan = RedisUtil.scan(key, 1);
|
||||
List<Object> streamInfoScan = RedisUtil.scan(key);
|
||||
return (String) streamInfoScan.get(0);
|
||||
}
|
||||
|
||||
@@ -399,7 +399,7 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||
+ channelId + "_"
|
||||
+ streamId + "_"
|
||||
+ callId;
|
||||
List<Object> scan = RedisUtil.scan(key, 1);
|
||||
List<Object> scan = RedisUtil.scan(key);
|
||||
if (scan.size() > 0) {
|
||||
return (SendRtpItem)RedisUtil.get((String)scan.get(0));
|
||||
}else {
|
||||
@@ -521,7 +521,7 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||
String key = VideoManagerConstants.PLATFORM_SEND_RTP_INFO_PREFIX
|
||||
+ userSetting.getServerId() + "_*_*_"
|
||||
+ channelId + "*_" + "*_";
|
||||
List<Object> RtpStreams = RedisUtil.scan(key, 1);
|
||||
List<Object> RtpStreams = RedisUtil.scan(key);
|
||||
if (RtpStreams.size() > 0) {
|
||||
return true;
|
||||
} else {
|
||||
@@ -613,7 +613,7 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||
stream,
|
||||
callId
|
||||
);
|
||||
List<Object> streamInfoScan = RedisUtil.scan(key, 1);
|
||||
List<Object> streamInfoScan = RedisUtil.scan(key);
|
||||
if (streamInfoScan.size() > 0) {
|
||||
return (StreamInfo) RedisUtil.get((String) streamInfoScan.get(0));
|
||||
}else {
|
||||
@@ -732,7 +732,7 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||
String scanKey = VideoManagerConstants.WVP_SERVER_STREAM_PREFIX + userSetting.getServerId() + "_*_" + app + "_" + streamId + "_" + mediaServerId;
|
||||
|
||||
OnStreamChangedHookParam result = null;
|
||||
List<Object> keys = RedisUtil.scan(scanKey, 1);
|
||||
List<Object> keys = RedisUtil.scan(scanKey);
|
||||
if (keys.size() > 0) {
|
||||
String key = (String) keys.get(0);
|
||||
result = (OnStreamChangedHookParam)RedisUtil.get(key);
|
||||
|
||||
Reference in New Issue
Block a user