Class MongoJCAConnectionSpec
java.lang.Object
org.eclipse.persistence.internal.nosql.adapters.mongo.MongoJCAConnectionSpec
- All Implemented Interfaces:
ConnectionSpec
Defines connection information for connecting to Mongo.
- Since:
- EclipseLink 2.4
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
Optional authSource https://www.mongodb.com/docs/manual/reference/connection-string/#mongodb-urioption-urioption.authSourceprotected String
Mongo database name.Hosts.protected int
Database default query options.protected char[]
Optional password.Ports.protected com.mongodb.ReadPreference
Database default read preference.protected String
Optional user name.protected com.mongodb.WriteConcern
Database default write concern. -
Constructor Summary
ConstructorDescriptionPUBLIC: Default constructor.PUBLIC: Construct the spec with the default directory. -
Method Summary
Modifier and TypeMethodDescriptiongetDB()
getHosts()
int
protected char[]
getPorts()
com.mongodb.ReadPreference
int
getUser()
com.mongodb.WriteConcern
void
setAuthSource
(String authSource) void
void
void
setOptions
(int options) void
setPassword
(char[] password) void
void
setReadPreference
(com.mongodb.ReadPreference readPreference) void
setServerSelectionTimeout
(int serverSelectionTimeout) void
void
setWriteConcern
(com.mongodb.WriteConcern writeConcern) toString()
-
Field Details
-
db
Mongo database name. -
authSource
Optional authSource https://www.mongodb.com/docs/manual/reference/connection-string/#mongodb-urioption-urioption.authSource -
user
Optional user name. -
password
protected char[] passwordOptional password. -
hosts
Hosts. -
ports
Ports. -
options
protected int optionsDatabase default query options. -
readPreference
protected com.mongodb.ReadPreference readPreferenceDatabase default read preference. -
writeConcern
protected com.mongodb.WriteConcern writeConcernDatabase default write concern.
-
-
Constructor Details
-
MongoJCAConnectionSpec
public MongoJCAConnectionSpec()PUBLIC: Default constructor. -
MongoJCAConnectionSpec
PUBLIC: Construct the spec with the default directory.
-
-
Method Details
-
getDB
-
setDB
-
getUser
-
setUser
-
getPassword
protected char[] getPassword() -
setPassword
public void setPassword(char[] password) -
getHosts
-
setHosts
-
getPorts
-
setPorts
-
toString
-
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
-
setAuthSource
-