File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,28 @@ public void reset(){
49
49
socketFactory = SocketFactory .getDefault ();
50
50
}
51
51
52
+ public MongoOptions copy () {
53
+ MongoOptions m = new MongoOptions ();
54
+ m .connectionsPerHost = connectionsPerHost ;
55
+ m .threadsAllowedToBlockForConnectionMultiplier = threadsAllowedToBlockForConnectionMultiplier ;
56
+ m .maxWaitTime = maxWaitTime ;
57
+ m .connectTimeout = connectTimeout ;
58
+ m .socketTimeout = socketTimeout ;
59
+ m .socketKeepAlive = socketKeepAlive ;
60
+ m .autoConnectRetry = autoConnectRetry ;
61
+ m .maxAutoConnectRetryTime = maxAutoConnectRetryTime ;
62
+ m .slaveOk = slaveOk ;
63
+ m .safe = safe ;
64
+ m .w = w ;
65
+ m .wtimeout = wtimeout ;
66
+ m .fsync = fsync ;
67
+ m .j = j ;
68
+ m .dbDecoderFactory = dbDecoderFactory ;
69
+ m .dbEncoderFactory = dbEncoderFactory ;
70
+ m .socketFactory = socketFactory ;
71
+ return m ;
72
+ }
73
+
52
74
/**
53
75
* Helper method to return the appropriate WriteConcern instance based
54
76
* on the current related options settings.
You can’t perform that action at this time.
0 commit comments