kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 1eddbb93fc67a301c66a3970f1c8732364be852b2f4a1775ace62aa73e0ee897 |
|---|---|
| Author | Alexandre Dutra <alexandre.dutra@datastax.com> · 2015-12-23 17:15 +01:00 |
| Committer | olim7t <omichallat+github@gmail.com> · 2016-01-06 10:37 +01:00 |
| Parents | 58da2e52b28d |
1 file changed
modified driver-core/src/main/java/com/datastax/driver/core/Configuration.java +18 −0
| @@ -72,6 +72,24 @@ | ||
| 72 | 72 | this.codecRegistry = codecRegistry; |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | + /** | |
| 76 | + * Copy constructor. | |
| 77 | + * | |
| 78 | + * @param toCopy the object to copy from. | |
| 79 | + */ | |
| 80 | + protected Configuration(Configuration toCopy) { | |
| 81 | + this( | |
| 82 | + toCopy.getPolicies(), | |
| 83 | + toCopy.getProtocolOptions(), | |
| 84 | + toCopy.getPoolingOptions(), | |
| 85 | + toCopy.getSocketOptions(), | |
| 86 | + toCopy.getMetricsOptions(), | |
| 87 | + toCopy.getQueryOptions(), | |
| 88 | + toCopy.getNettyOptions(), | |
| 89 | + toCopy.getCodecRegistry() | |
| 90 | + ); | |
| 91 | + } | |
| 92 | + | |
| 75 | 93 | void register(Cluster.Manager manager) { |
| 76 | 94 | protocolOptions.register(manager); |
| 77 | 95 | poolingOptions.register(manager); |