Package io.antmedia.console.datastore
Class MongoStore
java.lang.Object
io.antmedia.console.datastore.AbstractConsoleDataStore
io.antmedia.console.datastore.MongoStore
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprivate dev.morphia.Datastoreprotected static org.slf4j.Loggerprivate com.mongodb.client.MongoClientFields inherited from class io.antmedia.console.datastore.AbstractConsoleDataStore
SERVER_STORAGE_FILE, SERVER_STORAGE_MAP_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidclear()voidclose()booleandeleteUser(String username) booleandoesUserExist(String username, String password) This method is for authenticationbooleandoesUsernameExist(String username) booleanintbooleanReturn if data store is available.Methods inherited from class io.antmedia.console.datastore.AbstractConsoleDataStore
getBlockTime, getInvalidLoginCount, getInvalidLoginCountMap, getIsBlockedMap, incrementInvalidLoginCount, isUserBlocked, resetInvalidLoginCount, setBlocked, setBlockTime, setUnBlocked
-
Field Details
-
datastore
private dev.morphia.Datastore datastore -
logger
protected static org.slf4j.Logger logger -
available
protected volatile boolean available -
mongoClient
private com.mongodb.client.MongoClient mongoClient
-
-
Constructor Details
-
MongoStore
-
-
Method Details
-
getUserList
- Specified by:
getUserListin classAbstractConsoleDataStore
-
addUser
- Specified by:
addUserin classAbstractConsoleDataStore
-
editUser
- Specified by:
editUserin classAbstractConsoleDataStore
-
deleteUser
- Specified by:
deleteUserin classAbstractConsoleDataStore
-
doesUsernameExist
- Specified by:
doesUsernameExistin classAbstractConsoleDataStore
-
doesUserExist
This method is for authentication- Specified by:
doesUserExistin classAbstractConsoleDataStore
-
getUser
- Specified by:
getUserin classAbstractConsoleDataStore
-
clear
public void clear()- Specified by:
clearin classAbstractConsoleDataStore
-
close
public void close()- Specified by:
closein 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
-