Package io.antmedia.console.datastore
Class MongoStore
java.lang.Object
io.antmedia.console.datastore.AbstractConsoleDataStore
io.antmedia.console.datastore.MongoStore
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
private dev.morphia.Datastore
protected static org.slf4j.Logger
private com.mongodb.client.MongoClient
Fields inherited from class io.antmedia.console.datastore.AbstractConsoleDataStore
SERVER_STORAGE_FILE, SERVER_STORAGE_MAP_NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
void
clear()
void
close()
boolean
deleteUser
(String username) boolean
doesUserExist
(String username, String password) This method is for authenticationboolean
doesUsernameExist
(String username) boolean
int
boolean
Return 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:
getUserList
in classAbstractConsoleDataStore
-
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
This method is for authentication- Specified by:
doesUserExist
in classAbstractConsoleDataStore
-
getUser
- Specified by:
getUser
in classAbstractConsoleDataStore
-
clear
public void clear()- Specified by:
clear
in classAbstractConsoleDataStore
-
close
public void close()- Specified by:
close
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
-