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
FieldsModifier and TypeFieldDescriptionprotected booleanprotected com.google.gson.Gsonprotected static org.slf4j.LoggerFields inherited from class io.antmedia.console.datastore.AbstractConsoleDataStore
SERVER_STORAGE_FILE, SERVER_STORAGE_MAP_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleandeleteUser(String username) booleandoesUserExist(String username, String password) booleandoesUsernameExist(String username) booleanintbooleanReturn 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:
addUserin classAbstractConsoleDataStore
-
editUser
- Specified by:
editUserin classAbstractConsoleDataStore
-
deleteUser
- Specified by:
deleteUserin classAbstractConsoleDataStore
-
doesUsernameExist
- Specified by:
doesUsernameExistin classAbstractConsoleDataStore
-
doesUserExist
- Specified by:
doesUserExistin classAbstractConsoleDataStore
-
getUserList
- Specified by:
getUserListin classAbstractConsoleDataStore
-
getUser
- Specified by:
getUserin classAbstractConsoleDataStore
-
getNumberOfUserRecords
public int getNumberOfUserRecords()- Specified by:
getNumberOfUserRecordsin 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:
isAvailablein classAbstractConsoleDataStore- Returns:
- availability of the datastore
-