java.lang.Object
org.eclipse.persistence.internal.nosql.adapters.mongo.MongoJCAConnectionSpec
All Implemented Interfaces:
ConnectionSpec

public class MongoJCAConnectionSpec extends Object implements ConnectionSpec
Defines connection information for connecting to Mongo.
Since:
EclipseLink 2.4
  • Field Details

    • db

      protected String db
      Mongo database name.
    • authSource

      protected String authSource
      Optional authSource https://www.mongodb.com/docs/manual/reference/connection-string/#mongodb-urioption-urioption.authSource
    • user

      protected String user
      Optional user name.
    • password

      protected char[] password
      Optional password.
    • hosts

      protected List<String> hosts
      Hosts.
    • ports

      protected List<Integer> ports
      Ports.
    • options

      protected int options
      Database default query options.
    • readPreference

      protected com.mongodb.ReadPreference readPreference
      Database default read preference.
    • writeConcern

      protected com.mongodb.WriteConcern writeConcern
      Database default write concern.
  • Constructor Details

    • MongoJCAConnectionSpec

      public MongoJCAConnectionSpec()
      PUBLIC: Default constructor.
    • MongoJCAConnectionSpec

      public MongoJCAConnectionSpec(String db)
      PUBLIC: Construct the spec with the default directory.
  • Method Details

    • getDB

      public String getDB()
    • setDB

      public void setDB(String db)
    • getUser

      public String getUser()
    • setUser

      public void setUser(String user)
    • getPassword

      protected char[] getPassword()
    • setPassword

      public void setPassword(char[] password)
    • getHosts

      public List<String> getHosts()
    • setHosts

      public void setHosts(List<String> hosts)
    • getPorts

      public List<Integer> getPorts()
    • setPorts

      public void setPorts(List<Integer> ports)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getOptions

      public int getOptions()
    • setOptions

      public void setOptions(int options)
    • 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)
    • getServerSelectionTimeout

      public int getServerSelectionTimeout()
    • setServerSelectionTimeout

      public void setServerSelectionTimeout(int serverSelectionTimeout)
    • getAuthSource

      public String getAuthSource()
    • setAuthSource

      public void setAuthSource(String authSource)