[JAVA-204] Mongo constructors for single node should allow replicationset/slave/single option Created: 27/Oct/10 Updated: 23/Jun/15 Resolved: 23/Jun/15 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | API |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Scott Hernandez (Inactive) | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Cleanup the constructors so they are clear about the behavior of finding other nodes in a replicaset/pair/etc. and offer control over that behavior. Maybe a MongoOptions option... or not. See http://jira.mongodb.org/browse/JAVA-187 for some background. |
| Comments |
| Comment by Jeffrey Yemin [ 23/Jun/15 ] |
|
A list of server addresses implies discovery, a single server address is a direction connection. And the connection string and MongoClientOptions support the replica set name. |
| Comment by Craig Skinfill [ 10/Nov/10 ] |
|
I'm dumb. I just looked in the source for MongoURI and see that now. Are there any examples using MongoURI? Even a comment in the MongoURI code that shows some examples for allowed URIs would be great. I think this will work exactly for what I'm wanting. |
| Comment by Eliot Horowitz (Inactive) [ 08/Nov/10 ] |
|
Can you create a MongoURI? |
| Comment by Craig Skinfill [ 08/Nov/10 ] |
|
Could we get a constructor that supports either a list of strings as host:port or even a single string as host:port, host:port? I'm using mongo in a spring app, and using a properties file to store the configuration options. The only awkward option to set is if we are using a set of nodes for replicasets. Then I can't seem to find a way to use the .properties file to configure the nodes. |
| Comment by Eliot Horowitz (Inactive) [ 28/Oct/10 ] |
|
Don't want to do too much until pairs are deprecated. |