Package io.antmedia.console.datastore
Class MapBasedDataStore
java.lang.Object
io.antmedia.console.datastore.AbstractConsoleDataStore
io.antmedia.console.datastore.MapBasedDataStore
- Direct Known Subclasses:
MapDBStore
,RedisStore
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected com.google.gson.Gson
protected static org.slf4j.Logger
Fields inherited from class io.antmedia.console.datastore.AbstractConsoleDataStore
SERVER_STORAGE_FILE, SERVER_STORAGE_MAP_NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
deleteUser
(String username) boolean
doesUserExist
(String username, String password) boolean
doesUsernameExist
(String username) boolean
int
boolean
Return if data store is available.Methods inherited from class io.antmedia.console.datastore.AbstractConsoleDataStore
clear, close, getBlockTime, getInvalidLoginCount, getInvalidLoginCountMap, getIsBlockedMap, incrementInvalidLoginCount, isUserBlocked, resetInvalidLoginCount, setBlocked, setBlockTime, setUnBlocked
-
Field Details
-
userMap
-
gson
protected com.google.gson.Gson gson -
available
protected volatile boolean available -
logger
protected static org.slf4j.Logger logger
-
-
Constructor Details
-
MapBasedDataStore
protected MapBasedDataStore()
-
-
Method Details
-
addUser
- Specified by:
addUser
in classAbstractConsoleDataStore
-
editUser
- Specified by:
editUser
in classAbstractConsoleDataStore
-
deleteUser
- Specified by:
deleteUser
in classAbstractConsoleDataStore
-
doesUsernameExist
- Specified by:
doesUsernameExist
in classAbstractConsoleDataStore
-
doesUserExist
- Specified by:
doesUserExist
in classAbstractConsoleDataStore
-
getUserList
- Specified by:
getUserList
in classAbstractConsoleDataStore
-
getUser
- Specified by:
getUser
in classAbstractConsoleDataStore
-
getNumberOfUserRecords
public int getNumberOfUserRecords()- Specified by:
getNumberOfUserRecords
in classAbstractConsoleDataStore
-
isAvailable
public boolean isAvailable()Return if data store is available. DataStore is available if it's initialized and not closed. It's not available if it's closed.- Specified by:
isAvailable
in classAbstractConsoleDataStore
- Returns:
- availability of the datastore
-