Class BaseMongoDbProperties
java.lang.Object
org.apereo.cas.configuration.model.support.mongo.BaseMongoDbProperties
- All Implemented Interfaces:
Serializable
,CasFeatureModule
- Direct Known Subclasses:
MongoDbMonitorProperties
,MongoDbTicketRegistryProperties
,SingleCollectionMongoDbProperties
@RequiresModule(name="cas-server-support-mongo-core")
public abstract class BaseMongoDbProperties
extends Object
implements CasFeatureModule, Serializable
This is
BaseMongoDbProperties
.- Since:
- 5.1.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apereo.cas.configuration.features.CasFeatureModule
CasFeatureModule.FeatureCatalog
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionName of the database to use for authentication.The connection uri to the mongodb instance.MongoDb database instance name.getHost()
MongoDb database host for authentication.MongoDb database password for authentication.getPool()
core connection-related settings.int
getPort()
MongoDb database port.Read concern.Read preference.A replica set in MongoDB is a group ofmongod
processes that maintain the same data set.MongoDb database connection timeout.MongoDb database user for authentication.Write concern describes the level of acknowledgement requested from MongoDB for write operations to a standalone mongo db or to replica sets or to sharded clusters.boolean
Sets whether writes should be retried if they fail due to a network error.boolean
Whether the database socket connection should be tagged with keep-alive.boolean
Whether connections require SSL.setAuthenticationDatabaseName
(String authenticationDatabaseName) Name of the database to use for authentication.setClientUri
(String clientUri) The connection uri to the mongodb instance.setDatabaseName
(String databaseName) MongoDb database instance name.MongoDb database host for authentication.setPassword
(String password) MongoDb database password for authentication.core connection-related settings.setPort
(int port) MongoDb database port.setReadConcern
(String readConcern) Read concern.setReadPreference
(String readPreference) Read preference.setReplicaSet
(String replicaSet) A replica set in MongoDB is a group ofmongod
processes that maintain the same data set.setRetryWrites
(boolean retryWrites) Sets whether writes should be retried if they fail due to a network error.setSocketKeepAlive
(boolean socketKeepAlive) Whether the database socket connection should be tagged with keep-alive.setSslEnabled
(boolean sslEnabled) Whether connections require SSL.setTimeout
(String timeout) MongoDb database connection timeout.MongoDb database user for authentication.setWriteConcern
(String writeConcern) Write concern describes the level of acknowledgement requested from MongoDB for write operations to a standalone mongo db or to replica sets or to sharded clusters.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apereo.cas.configuration.features.CasFeatureModule
isDefined, isUndefined
-
Constructor Details
-
BaseMongoDbProperties
public BaseMongoDbProperties()
-
-
Method Details
-
getPool
core connection-related settings. -
getClientUri
The connection uri to the mongodb instance. This typically takes on the form ofmongodb://user:[email protected]:35522/db
. If not specified, will fallback onto other individual settings. If specified, takes over all other settings where applicable. -
getPort
public int getPort()MongoDb database port. -
getUserId
MongoDb database user for authentication. -
getPassword
MongoDb database password for authentication. -
getHost
MongoDb database host for authentication. Multiple host addresses may be defined, separated by comma. If more than one host is defined, it is assumed that each host contains the port as well, if any. Otherwise the configuration may fallback onto the port defined. -
getTimeout
MongoDb database connection timeout. -
getWriteConcern
Write concern describes the level of acknowledgement requested from MongoDB for write operations to a standalone mongo db or to replica sets or to sharded clusters. In sharded clusters, mongo db instances will pass the write concern on to the shards. -
getReadConcern
Read concern. Accepted values are:LOCAL
MAJORITY
LINEARIZABLE
SNAPSHOT
AVAILABLE
-
getReadPreference
Read preference. Accepted values are:PRIMARY
SECONDARY
SECONDARY_PREFERRED
PRIMARY_PREFERRED
NEAREST
-
getDatabaseName
MongoDb database instance name. -
isSocketKeepAlive
public boolean isSocketKeepAlive()Whether the database socket connection should be tagged with keep-alive. -
isRetryWrites
public boolean isRetryWrites()Sets whether writes should be retried if they fail due to a network error. -
getAuthenticationDatabaseName
Name of the database to use for authentication. -
isSslEnabled
public boolean isSslEnabled()Whether connections require SSL. -
getReplicaSet
A replica set in MongoDB is a group ofmongod
processes that maintain the same data set. Replica sets provide redundancy and high availability, and are the basis for all production deployments. -
setPool
core connection-related settings.- Returns:
this
.
-
setClientUri
The connection uri to the mongodb instance. This typically takes on the form ofmongodb://user:[email protected]:35522/db
. If not specified, will fallback onto other individual settings. If specified, takes over all other settings where applicable.- Returns:
this
.
-
setPort
MongoDb database port.- Returns:
this
.
-
setUserId
MongoDb database user for authentication.- Returns:
this
.
-
setPassword
MongoDb database password for authentication.- Returns:
this
.
-
setHost
MongoDb database host for authentication. Multiple host addresses may be defined, separated by comma. If more than one host is defined, it is assumed that each host contains the port as well, if any. Otherwise the configuration may fallback onto the port defined.- Returns:
this
.
-
setTimeout
MongoDb database connection timeout.- Returns:
this
.
-
setWriteConcern
Write concern describes the level of acknowledgement requested from MongoDB for write operations to a standalone mongo db or to replica sets or to sharded clusters. In sharded clusters, mongo db instances will pass the write concern on to the shards.- Returns:
this
.
-
setReadConcern
Read concern. Accepted values are:LOCAL
MAJORITY
LINEARIZABLE
SNAPSHOT
AVAILABLE
- Returns:
this
.
-
setReadPreference
Read preference. Accepted values are:PRIMARY
SECONDARY
SECONDARY_PREFERRED
PRIMARY_PREFERRED
NEAREST
- Returns:
this
.
-
setDatabaseName
MongoDb database instance name.- Returns:
this
.
-
setSocketKeepAlive
Whether the database socket connection should be tagged with keep-alive.- Returns:
this
.
-
setRetryWrites
Sets whether writes should be retried if they fail due to a network error.- Returns:
this
.
-
setAuthenticationDatabaseName
Name of the database to use for authentication.- Returns:
this
.
-
setSslEnabled
Whether connections require SSL.- Returns:
this
.
-
setReplicaSet
A replica set in MongoDB is a group ofmongod
processes that maintain the same data set. Replica sets provide redundancy and high availability, and are the basis for all production deployments.- Returns:
this
.
-