Class MongoClientConfiguration
java.lang.Object
org.ikasan.component.endpoint.mongo.MongoClientConfiguration
Mongo configuration options passed at runtime.
For full details see Mongo Client Driver http://api.mongodb.org/java/2.12/
- Author:
- Ikasan Development Team
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BooleanSets whether JMX beans registered by the driver should always be MBeans, regardless of whether the VM is Java 6 or greater - overrides default driver options if specifiedprotected StringApplication name to be passed to Mongo connection stringprotected Stringdatabase nameprotected Booleando we authenticate the connectioncollection key name and actual nameprotected IntegerSets the maximum number of connections per host - overrides default driver options if specifiedprotected IntegerSets the connection timeout - overrides default driver options if specifiedMongo Driver Propertiesprotected BooleanSets whether cursor finalizers are enabled.protected Stringdatabase nameprotected StringSets the description - overrides default driver options if specifiedprotected IntegerSets the heartbeat connect timeout - overrides default driver options if specifiedprotected IntegerSets the heartbeat frequency - overrides default driver options if specifiedprotected IntegerSets the heartbeat connect socket timeout - overrides default driver options if specifiedprotected BooleanSets defaults to be what they are in MongoOptions - overrides default driver options if specifiedprotected IntegerSets the localThreshold - overrides default driver options if specifiedprotected IntegerSets the maximum idle time for a pooled connection - overrides default driver options if specifiedprotected IntegerSets the maximum life time for a pooled connection - overrides default driver options if specifiedprotected IntegerSets the maximum time that a thread will block waiting for a connection - overrides default driver options if specifiedprotected IntegerSets the minimum number of connections per host - overrides default driver options if specifiedprotected IntegerSets the min heart beat frequency - overrides default driver options if specifiedprotected Stringauthentication credentialprotected com.mongodb.ReadPreferencerepresents preferred replica set members to which a query or command can be sentprotected StringSets the required replica set name for the cluster - overrides default driver options if specifiedprotected BooleanSets whether socket keep alive is enabled - overrides default driver options if specifiedprotected IntegerSets the socket timeout - overrides default driver options if specifiedprotected BooleanDoes it use '+srv' to connect to the mongo endpointprotected BooleanDoes it use SSLprotected BooleanDoes it validate the server hostname to match the certificateprotected IntegerSets the multiplier for number of threads allowed to block waiting for a connection - overrides default driver options if specifiedprotected Stringauthentication principalprotected com.mongodb.WriteConcernControls the acknowledgment of write operations -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.mongodb.ReadPreferenceprotected List<com.mongodb.ServerAddress>Utility method for translating the list of connectionUrls (host:port) to host and port into ServerAddress(es)com.mongodb.WriteConcernvoidsetAlwaysUseMBeans(Boolean alwaysUseMBeans) voidsetApplicationName(String applicationName) voidsetAuthDatabaseName(String authDatabaseName) voidsetAuthenticated(Boolean authenticated) voidsetCollectionNames(Map<String, String> collectionNames) voidsetConnectionsPerHost(Integer connectionsPerHost) voidsetConnectionTimeout(Integer connectionTimeout) voidsetConnectionUrls(List<String> connectionUrls) voidsetCursorFinalizerEnabled(Boolean cursorFinalizerEnabled) voidsetDatabaseName(String databaseName) voidsetDescription(String description) voidsetHeartbeatConnectTimeout(Integer heartbeatConnectTimeout) voidsetHeartbeatFrequency(Integer heartbeatFrequency) voidsetHeartbeatSocketTimeout(Integer heartbeatSocketTimeout) voidsetLegacyDefaults(Boolean legacyDefaults) voidsetLocalThreshold(Integer localThreshold) voidsetMaxConnectionIdleTime(Integer maxConnectionIdleTime) voidsetMaxConnectionLifeTime(Integer maxConnectionLifeTime) voidsetMaxWaitTime(Integer maxWaitTime) voidsetMinConnectionsPerHost(Integer minConnectionsPerHost) voidsetMinHeartbeatFrequency(Integer minHeartbeatFrequency) voidsetPassword(String password) voidsetReadPreference(com.mongodb.ReadPreference readPreference) voidsetRequiredReplicaSetName(String requiredReplicaSetName) voidsetSocketKeepAlive(Boolean socketKeepAlive) voidsetSocketTimeout(Integer socketTimeout) voidsetSrvRecord(Boolean srvRecord) voidsetSslEnabled(Boolean sslEnabled) voidsetSslInvalidHostNameAllowed(Boolean sslInvalidHostNameAllowed) voidsetThreadsAllowedToBlockForConnectionMultiplier(Integer threadsAllowedToBlockForConnectionMultiplier) voidsetUsername(String username) voidsetWriteConcern(com.mongodb.WriteConcern writeConcern) toString()voidvalidate()Basic validation of the configuration.
-
Field Details
-
connectionUrls
Mongo Driver Properties -
authenticated
do we authenticate the connection -
username
authentication principal -
password
authentication credential -
databaseName
database name -
applicationName
Application name to be passed to Mongo connection string -
collectionNames
collection key name and actual name -
readPreference
protected com.mongodb.ReadPreference readPreferencerepresents preferred replica set members to which a query or command can be sent -
writeConcern
protected com.mongodb.WriteConcern writeConcernControls the acknowledgment of write operations -
localThreshold
Sets the localThreshold - overrides default driver options if specified -
alwaysUseMBeans
Sets whether JMX beans registered by the driver should always be MBeans, regardless of whether the VM is Java 6 or greater - overrides default driver options if specified -
connectionsPerHost
Sets the maximum number of connections per host - overrides default driver options if specified -
connectionTimeout
Sets the connection timeout - overrides default driver options if specified -
cursorFinalizerEnabled
Sets whether cursor finalizers are enabled. - overrides default driver options if specified -
description
Sets the description - overrides default driver options if specified -
minHeartbeatFrequency
Sets the min heart beat frequency - overrides default driver options if specified -
heartbeatConnectTimeout
Sets the heartbeat connect timeout - overrides default driver options if specified -
heartbeatFrequency
Sets the heartbeat frequency - overrides default driver options if specified -
heartbeatSocketTimeout
Sets the heartbeat connect socket timeout - overrides default driver options if specified -
legacyDefaults
Sets defaults to be what they are in MongoOptions - overrides default driver options if specified -
maxConnectionIdleTime
Sets the maximum idle time for a pooled connection - overrides default driver options if specified -
maxConnectionLifeTime
Sets the maximum life time for a pooled connection - overrides default driver options if specified -
maxWaitTime
Sets the maximum time that a thread will block waiting for a connection - overrides default driver options if specified -
minConnectionsPerHost
Sets the minimum number of connections per host - overrides default driver options if specified -
requiredReplicaSetName
Sets the required replica set name for the cluster - overrides default driver options if specified -
socketKeepAlive
Sets whether socket keep alive is enabled - overrides default driver options if specified -
socketTimeout
Sets the socket timeout - overrides default driver options if specified -
threadsAllowedToBlockForConnectionMultiplier
Sets the multiplier for number of threads allowed to block waiting for a connection - overrides default driver options if specified -
authDatabaseName
database name -
sslEnabled
Does it use SSL -
sslInvalidHostNameAllowed
Does it validate the server hostname to match the certificate -
srvRecord
Does it use '+srv' to connect to the mongo endpoint
-
-
Constructor Details
-
MongoClientConfiguration
public MongoClientConfiguration()
-
-
Method Details
-
getConnectionUrls
-
setConnectionUrls
-
isAuthenticated
-
getAuthenticated
-
setAuthenticated
-
getUsername
-
setUsername
-
getPassword
-
setPassword
-
getDatabaseName
-
setDatabaseName
-
getApplicationName
-
setApplicationName
-
getCollectionNames
-
setCollectionNames
-
getReadPreference
public com.mongodb.ReadPreference getReadPreference() -
setReadPreference
public void setReadPreference(com.mongodb.ReadPreference readPreference) -
getWriteConcern
public com.mongodb.WriteConcern getWriteConcern() -
setWriteConcern
public void setWriteConcern(com.mongodb.WriteConcern writeConcern) -
getLocalThreshold
-
setLocalThreshold
-
getAlwaysUseMBeans
-
setAlwaysUseMBeans
-
getConnectionsPerHost
-
setConnectionsPerHost
-
getConnectionTimeout
-
setConnectionTimeout
-
getCursorFinalizerEnabled
-
setCursorFinalizerEnabled
-
getDescription
-
setDescription
-
getMinHeartbeatFrequency
-
setMinHeartbeatFrequency
-
getHeartbeatConnectTimeout
-
setHeartbeatConnectTimeout
-
getHeartbeatFrequency
-
setHeartbeatFrequency
-
getHeartbeatSocketTimeout
-
setHeartbeatSocketTimeout
-
getLegacyDefaults
-
setLegacyDefaults
-
getMaxConnectionIdleTime
-
setMaxConnectionIdleTime
-
getMaxConnectionLifeTime
-
setMaxConnectionLifeTime
-
getMaxWaitTime
-
setMaxWaitTime
-
getMinConnectionsPerHost
-
setMinConnectionsPerHost
-
getRequiredReplicaSetName
-
setRequiredReplicaSetName
-
getSocketKeepAlive
-
setSocketKeepAlive
-
getSocketTimeout
-
setSocketTimeout
-
getThreadsAllowedToBlockForConnectionMultiplier
-
setThreadsAllowedToBlockForConnectionMultiplier
public void setThreadsAllowedToBlockForConnectionMultiplier(Integer threadsAllowedToBlockForConnectionMultiplier) -
getServerAddresses
Utility method for translating the list of connectionUrls (host:port) to host and port into ServerAddress(es)- Returns:
-
getAuthDatabaseName
-
setAuthDatabaseName
-
getSslEnabled
-
setSslEnabled
-
getSslInvalidHostNameAllowed
-
setSslInvalidHostNameAllowed
-
getSrvRecord
-
setSrvRecord
-
validate
public void validate()Basic validation of the configuration. -
toString
-