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
FieldsModifier and TypeFieldDescriptionprotected static org.slf4j.Logger(package private) org.redisson.api.RedissonClientFields inherited from class io.antmedia.datastore.db.MapBasedDataStore
conferenceRoomMap, connectionEventsMap, dbName, detectionMap, gson, INCONSISTENCY_MESSAGE, map, subscriberMap, subscriberMetadataMap, tokenMap, vodMap, webRTCViewerMapFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclearStreamInfoList(String streamId) Remove the stream info list from dbvoidclose(boolean deleteDB) Closes the databasebooleanCreates new P2PConnectionbooleandeleteP2PConnection(String streamId) Deletes a P2PConnectionlonggetLocalLiveBroadcastCount(String hostAddress) getLocalLiveBroadcasts(String hostAddress) getP2PConnection(String streamId) Get the P2PConnection by streamIdgetStreamInfoList(String streamId) Returns stream info list added to dbintresetBroadcasts(String hostAddress) Resets the broadcasts in the database.voidsaveStreamInfo(StreamInfo streamInfo) Saves the stream info to the dbMethods inherited from class io.antmedia.datastore.db.MapBasedDataStore
addConnectionEvent, addEndpoint, addSubscriber, addVod, blockSubscriber, delete, deleteSubscriber, deleteToken, deleteVod, fetchUserVodList, get, getActiveBroadcastCount, getActiveBroadcastList, getActiveSubtracks, getActiveSubtracks, getActiveSubtracksCount, getBroadcastFromMap, getBroadcastList, getBroadcastListV2, getConferenceRoomMap, getConnectedSubscriberCount, getConnectedSubscribers, getConnectionEvents, getExternalStreamsList, getPartialBroadcastNumber, getPartialVodNumber, getReturningConnectionEventsList, getSubscriber, getSubscriberMetaData, getSubtrackCount, getSubtracks, getSubtracks, getToken, getTotalBroadcastNumber, getTotalVodNumber, getTotalWebRTCViewersCount, getVoD, getVodList, getVodListV2, hasSubtracks, listAllSubscribers, listAllTokens, putSubscriberMetaData, removeAllEndpoints, removeEndpoint, resetSubscribersConnectedStatus, revokeSubscribers, revokeTokens, save, saveToken, setBroadcastToMap, setMp4Muxing, setWebMMuxing, updateBroadcastFields, updateDASHViewerCountLocal, updateHLSViewerCountLocal, updateRtmpViewerCountLocal, updateStatus, updateStreamMetaData, updateVoDProcessStatus, updateWebRTCViewerCountLocal, validateTokenMethods inherited from class io.antmedia.datastore.db.DataStore
addQueryTime, addSubscriberConnectionEvent, get, getActiveBroadcastCount, getActiveBroadcastList, getAverageQueryTimeMs, getBroadcastCount, getConnectionEventListFromCollection, getExecutedQueryCount, getSubscriber, getToken, getTotalBroadcastNumber, getTotalVodNumber, getTotalWebRTCViewersCount, getVoD, getVodListV2, handleConnectionEvent, isAvailable, isSubscriberConnected, listAllSubscribers, listAllTokens, saveBroadcast, searchOnServer, searchOnServerVod, setAppSettings, showWarningIfElapsedTimeIsMoreThanThreshold, sortAndCropBroadcastList, sortAndCropVodList, 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:DataStoreCloses the database -
resetBroadcasts
Description copied from class:DataStoreResets the broadcasts in the database. It sets number of viewers to zero. It also delete the stream if it's zombi stream- Overrides:
resetBroadcastsin classMapBasedDataStore
-
getStreamInfoList
Description copied from class:DataStoreReturns stream info list added to db- Overrides:
getStreamInfoListin classMapBasedDataStore- Returns:
-
clearStreamInfoList
Description copied from class:DataStoreRemove the stream info list from db- Overrides:
clearStreamInfoListin classMapBasedDataStore
-
saveStreamInfo
Description copied from class:DataStoreSaves the stream info to the db- Overrides:
saveStreamInfoin classMapBasedDataStore
-
createP2PConnection
Description copied from class:DataStoreCreates new P2PConnection- Overrides:
createP2PConnectionin classMapBasedDataStore- Parameters:
conn- - P2PConnection object- Returns:
- boolean - success
-
deleteP2PConnection
Description copied from class:DataStoreDeletes a P2PConnection- Overrides:
deleteP2PConnectionin classMapBasedDataStore- Returns:
- boolean - success
-
getP2PConnection
Description copied from class:DataStoreGet the P2PConnection by streamId- Overrides:
getP2PConnectionin classMapBasedDataStore- Parameters:
streamId- - stream id for P2PConnection- Returns:
- P2PConnection - if exist else null
-
getLocalLiveBroadcastCount
- Specified by:
getLocalLiveBroadcastCountin classDataStore
-
getLocalLiveBroadcasts
- Specified by:
getLocalLiveBroadcastsin classDataStore
-