Package io.antmedia.datastore.db
Class RedisStore
java.lang.Object
io.antmedia.datastore.db.DataStore
io.antmedia.datastore.db.MapBasedDataStore
io.antmedia.datastore.db.RedisStore
-
Field Summary
Modifier and TypeFieldDescriptionprotected static org.slf4j.Logger
(package private) org.redisson.api.RedissonClient
Fields inherited from class io.antmedia.datastore.db.MapBasedDataStore
conferenceRoomMap, connectionEventsMap, dbName, detectionMap, gson, INCONSISTENCY_MESSAGE, map, subscriberMap, subscriberMetadataMap, tokenMap, vodMap, webRTCViewerMap
Fields inherited from class io.antmedia.datastore.db.DataStore
appSettings, available, MAX_ITEM_IN_ONE_LIST, REPLACE_CHARS_REGEX, TOTAL_WEBRTC_VIEWER_COUNT_CACHE_TIME, totalWebRTCViewerCount, totalWebRTCViewerCountLastUpdateTime
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clearStreamInfoList
(String streamId) Remove the stream info list from dbvoid
close
(boolean deleteDB) Closes the databaseboolean
Creates new P2PConnectionboolean
deleteP2PConnection
(String streamId) Deletes a P2PConnectionlong
getLocalLiveBroadcastCount
(String hostAddress) getLocalLiveBroadcasts
(String hostAddress) getP2PConnection
(String streamId) Get the P2PConnection by streamIdgetStreamInfoList
(String streamId) Returns stream info list added to dbint
resetBroadcasts
(String hostAddress) Resets the broadcasts in the database.void
saveStreamInfo
(StreamInfo streamInfo) Saves the stream info to the dbMethods inherited from class io.antmedia.datastore.db.MapBasedDataStore
addConnectionEvent, addEndpoint, addSubscriber, addSubTrack, addVod, blockSubscriber, delete, deleteSubscriber, deleteToken, deleteVod, deleteWebRTCViewerInfo, fetchUserVodList, get, getActiveBroadcastCount, getActiveBroadcastList, getActiveSubtracks, getActiveSubtracksCount, getBroadcastCount, getBroadcastFromMap, getBroadcastList, getBroadcastListV2, getConferenceRoomMap, getConnectionEvents, getDetection, getDetectionList, getExternalStreamsList, getObjectDetectedTotal, getPartialBroadcastNumber, getPartialVodNumber, getReturningConnectionEventsList, getSubscriber, getSubscriberMetaData, getSubtrackCount, getSubtracks, getSubtracks, getToken, getTotalBroadcastNumber, getTotalVodNumber, getTotalWebRTCViewersCount, getVoD, getVodList, getVodListV2, getWebRTCViewerList, hasSubtracks, listAllSubscribers, listAllTokens, migrateConferenceRoomsToBroadcasts, putSubscriberMetaData, removeAllEndpoints, removeEndpoint, removeSubTrack, resetSubscribersConnectedStatus, revokeSubscribers, revokeTokens, save, saveDetection, saveToken, saveViewerInfo, setBroadcastToMap, setMp4Muxing, setWebMMuxing, updateBroadcastFields, updateDASHViewerCountLocal, updateHLSViewerCountLocal, updateRtmpViewerCountLocal, updateStatus, updateStreamMetaData, updateVoDProcessStatus, updateWebRTCViewerCountLocal, validateToken
Methods inherited from class io.antmedia.datastore.db.DataStore
addQueryTime, addSubscriberConnectionEvent, broadcastToConference, conferenceToBroadcast, conferenceUpdateToBroadcastUpdate, get, getActiveBroadcastCount, getActiveBroadcastList, getAverageQueryTimeMs, getBroadcastCount, getConnectionEventListFromCollection, getDetection, getDetectionList, getExecutedQueryCount, getObjectDetectedTotal, getSubscriber, getToken, getTotalBroadcastNumber, getTotalVodNumber, getTotalWebRTCViewersCount, getVoD, getVodListV2, getWebRTCViewerList, handleConnectionEvent, isAvailable, isSubscriberConnected, listAllSubscribers, listAllSubscriberStats, listAllTokens, saveBroadcast, searchOnServer, searchOnServerVod, searchOnWebRTCViewerInfo, setAppSettings, showWarningIfElapsedTimeIsMoreThanThreshold, sortAndCropBroadcastList, sortAndCropVodList, sortAndCropWebRTCViewerInfoList, updateDASHViewerCount, updateHLSViewerCount, updateRtmpViewerCount, updateStreamInfo, updateSubscriberBitrateEvent, updateWebRTCViewerCount
-
Field Details
-
logger
protected static org.slf4j.Logger logger -
redisson
org.redisson.api.RedissonClient redisson -
streamInfoMap
-
p2pMap
-
-
Constructor Details
-
RedisStore
-
-
Method Details
-
close
public void close(boolean deleteDB) Description copied from class:DataStore
Closes the database -
resetBroadcasts
Description copied from class:DataStore
Resets the broadcasts in the database. It sets number of viewers to zero. It also delete the stream if it's zombi stream- Overrides:
resetBroadcasts
in classMapBasedDataStore
-
getStreamInfoList
Description copied from class:DataStore
Returns stream info list added to db- Overrides:
getStreamInfoList
in classMapBasedDataStore
- Returns:
-
clearStreamInfoList
Description copied from class:DataStore
Remove the stream info list from db- Overrides:
clearStreamInfoList
in classMapBasedDataStore
-
saveStreamInfo
Description copied from class:DataStore
Saves the stream info to the db- Overrides:
saveStreamInfo
in classMapBasedDataStore
-
createP2PConnection
Description copied from class:DataStore
Creates new P2PConnection- Overrides:
createP2PConnection
in classMapBasedDataStore
- Parameters:
conn
- - P2PConnection object- Returns:
- boolean - success
-
deleteP2PConnection
Description copied from class:DataStore
Deletes a P2PConnection- Overrides:
deleteP2PConnection
in classMapBasedDataStore
- Returns:
- boolean - success
-
getP2PConnection
Description copied from class:DataStore
Get the P2PConnection by streamId- Overrides:
getP2PConnection
in classMapBasedDataStore
- Parameters:
streamId
- - stream id for P2PConnection- Returns:
- P2PConnection - if exist else null
-
getLocalLiveBroadcastCount
- Specified by:
getLocalLiveBroadcastCount
in classDataStore
-
getLocalLiveBroadcasts
- Specified by:
getLocalLiveBroadcasts
in classDataStore
-