Class MongoClientConfiguration

java.lang.Object
org.ikasan.component.endpoint.mongo.MongoClientConfiguration

public class MongoClientConfiguration extends Object
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 Details

    • connectionUrls

      protected List<String> connectionUrls
      Mongo Driver Properties
    • authenticated

      protected Boolean authenticated
      do we authenticate the connection
    • username

      protected String username
      authentication principal
    • password

      protected String password
      authentication credential
    • databaseName

      protected String databaseName
      database name
    • applicationName

      protected String applicationName
      Application name to be passed to Mongo connection string
    • collectionNames

      protected Map<String,String> collectionNames
      collection key name and actual name
    • readPreference

      protected com.mongodb.ReadPreference readPreference
      represents preferred replica set members to which a query or command can be sent
    • writeConcern

      protected com.mongodb.WriteConcern writeConcern
      Controls the acknowledgment of write operations
    • localThreshold

      protected Integer localThreshold
      Sets the localThreshold - overrides default driver options if specified
    • alwaysUseMBeans

      protected Boolean 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

      protected Integer connectionsPerHost
      Sets the maximum number of connections per host - overrides default driver options if specified
    • connectionTimeout

      protected Integer connectionTimeout
      Sets the connection timeout - overrides default driver options if specified
    • cursorFinalizerEnabled

      protected Boolean cursorFinalizerEnabled
      Sets whether cursor finalizers are enabled. - overrides default driver options if specified
    • description

      protected String description
      Sets the description - overrides default driver options if specified
    • minHeartbeatFrequency

      protected Integer minHeartbeatFrequency
      Sets the min heart beat frequency - overrides default driver options if specified
    • heartbeatConnectTimeout

      protected Integer heartbeatConnectTimeout
      Sets the heartbeat connect timeout - overrides default driver options if specified
    • heartbeatFrequency

      protected Integer heartbeatFrequency
      Sets the heartbeat frequency - overrides default driver options if specified
    • heartbeatSocketTimeout

      protected Integer heartbeatSocketTimeout
      Sets the heartbeat connect socket timeout - overrides default driver options if specified
    • legacyDefaults

      protected Boolean legacyDefaults
      Sets defaults to be what they are in MongoOptions - overrides default driver options if specified
    • maxConnectionIdleTime

      protected Integer maxConnectionIdleTime
      Sets the maximum idle time for a pooled connection - overrides default driver options if specified
    • maxConnectionLifeTime

      protected Integer maxConnectionLifeTime
      Sets the maximum life time for a pooled connection - overrides default driver options if specified
    • maxWaitTime

      protected Integer maxWaitTime
      Sets the maximum time that a thread will block waiting for a connection - overrides default driver options if specified
    • minConnectionsPerHost

      protected Integer minConnectionsPerHost
      Sets the minimum number of connections per host - overrides default driver options if specified
    • requiredReplicaSetName

      protected String requiredReplicaSetName
      Sets the required replica set name for the cluster - overrides default driver options if specified
    • socketKeepAlive

      protected Boolean socketKeepAlive
      Sets whether socket keep alive is enabled - overrides default driver options if specified
    • socketTimeout

      protected Integer socketTimeout
      Sets the socket timeout - overrides default driver options if specified
    • threadsAllowedToBlockForConnectionMultiplier

      protected Integer threadsAllowedToBlockForConnectionMultiplier
      Sets the multiplier for number of threads allowed to block waiting for a connection - overrides default driver options if specified
    • authDatabaseName

      protected String authDatabaseName
      database name
    • sslEnabled

      protected Boolean sslEnabled
      Does it use SSL
    • sslInvalidHostNameAllowed

      protected Boolean sslInvalidHostNameAllowed
      Does it validate the server hostname to match the certificate
    • srvRecord

      protected Boolean srvRecord
      Does it use '+srv' to connect to the mongo endpoint
  • Constructor Details

    • MongoClientConfiguration

      public MongoClientConfiguration()
  • Method Details

    • getConnectionUrls

      public List<String> getConnectionUrls()
    • setConnectionUrls

      public void setConnectionUrls(List<String> connectionUrls)
    • isAuthenticated

      public Boolean isAuthenticated()
    • getAuthenticated

      public Boolean getAuthenticated()
    • setAuthenticated

      public void setAuthenticated(Boolean authenticated)
    • getUsername

      public String getUsername()
    • setUsername

      public void setUsername(String username)
    • getPassword

      public String getPassword()
    • setPassword

      public void setPassword(String password)
    • getDatabaseName

      public String getDatabaseName()
    • setDatabaseName

      public void setDatabaseName(String databaseName)
    • getApplicationName

      public String getApplicationName()
    • setApplicationName

      public void setApplicationName(String applicationName)
    • getCollectionNames

      public Map<String,String> getCollectionNames()
    • setCollectionNames

      public void setCollectionNames(Map<String,String> collectionNames)
    • 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

      public Integer getLocalThreshold()
    • setLocalThreshold

      public void setLocalThreshold(Integer localThreshold)
    • getAlwaysUseMBeans

      public Boolean getAlwaysUseMBeans()
    • setAlwaysUseMBeans

      public void setAlwaysUseMBeans(Boolean alwaysUseMBeans)
    • getConnectionsPerHost

      public Integer getConnectionsPerHost()
    • setConnectionsPerHost

      public void setConnectionsPerHost(Integer connectionsPerHost)
    • getConnectionTimeout

      public Integer getConnectionTimeout()
    • setConnectionTimeout

      public void setConnectionTimeout(Integer connectionTimeout)
    • getCursorFinalizerEnabled

      public Boolean getCursorFinalizerEnabled()
    • setCursorFinalizerEnabled

      public void setCursorFinalizerEnabled(Boolean cursorFinalizerEnabled)
    • getDescription

      public String getDescription()
    • setDescription

      public void setDescription(String description)
    • getMinHeartbeatFrequency

      public Integer getMinHeartbeatFrequency()
    • setMinHeartbeatFrequency

      public void setMinHeartbeatFrequency(Integer minHeartbeatFrequency)
    • getHeartbeatConnectTimeout

      public Integer getHeartbeatConnectTimeout()
    • setHeartbeatConnectTimeout

      public void setHeartbeatConnectTimeout(Integer heartbeatConnectTimeout)
    • getHeartbeatFrequency

      public Integer getHeartbeatFrequency()
    • setHeartbeatFrequency

      public void setHeartbeatFrequency(Integer heartbeatFrequency)
    • getHeartbeatSocketTimeout

      public Integer getHeartbeatSocketTimeout()
    • setHeartbeatSocketTimeout

      public void setHeartbeatSocketTimeout(Integer heartbeatSocketTimeout)
    • getLegacyDefaults

      public Boolean getLegacyDefaults()
    • setLegacyDefaults

      public void setLegacyDefaults(Boolean legacyDefaults)
    • getMaxConnectionIdleTime

      public Integer getMaxConnectionIdleTime()
    • setMaxConnectionIdleTime

      public void setMaxConnectionIdleTime(Integer maxConnectionIdleTime)
    • getMaxConnectionLifeTime

      public Integer getMaxConnectionLifeTime()
    • setMaxConnectionLifeTime

      public void setMaxConnectionLifeTime(Integer maxConnectionLifeTime)
    • getMaxWaitTime

      public Integer getMaxWaitTime()
    • setMaxWaitTime

      public void setMaxWaitTime(Integer maxWaitTime)
    • getMinConnectionsPerHost

      public Integer getMinConnectionsPerHost()
    • setMinConnectionsPerHost

      public void setMinConnectionsPerHost(Integer minConnectionsPerHost)
    • getRequiredReplicaSetName

      public String getRequiredReplicaSetName()
    • setRequiredReplicaSetName

      public void setRequiredReplicaSetName(String requiredReplicaSetName)
    • getSocketKeepAlive

      public Boolean getSocketKeepAlive()
    • setSocketKeepAlive

      public void setSocketKeepAlive(Boolean socketKeepAlive)
    • getSocketTimeout

      public Integer getSocketTimeout()
    • setSocketTimeout

      public void setSocketTimeout(Integer socketTimeout)
    • getThreadsAllowedToBlockForConnectionMultiplier

      public Integer getThreadsAllowedToBlockForConnectionMultiplier()
    • setThreadsAllowedToBlockForConnectionMultiplier

      public void setThreadsAllowedToBlockForConnectionMultiplier(Integer threadsAllowedToBlockForConnectionMultiplier)
    • getServerAddresses

      protected List<com.mongodb.ServerAddress> getServerAddresses()
      Utility method for translating the list of connectionUrls (host:port) to host and port into ServerAddress(es)
      Returns:
    • getAuthDatabaseName

      public String getAuthDatabaseName()
    • setAuthDatabaseName

      public void setAuthDatabaseName(String authDatabaseName)
    • getSslEnabled

      public Boolean getSslEnabled()
    • setSslEnabled

      public void setSslEnabled(Boolean sslEnabled)
    • getSslInvalidHostNameAllowed

      public Boolean getSslInvalidHostNameAllowed()
    • setSslInvalidHostNameAllowed

      public void setSslInvalidHostNameAllowed(Boolean sslInvalidHostNameAllowed)
    • getSrvRecord

      public Boolean getSrvRecord()
    • setSrvRecord

      public void setSrvRecord(Boolean srvRecord)
    • validate

      public void validate()
      Basic validation of the configuration.
    • toString

      public String toString()
      Overrides:
      toString in class Object