kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 4104611f66e4ce14656911f117d1be84ffbcb78007458ce4db087239e498f252 |
|---|---|
| Author | olim7t <omichallat+github@gmail.com> · 2014-10-07 19:01 +02:00 |
| Committer | olim7t <omichallat+github@gmail.com> · 2014-10-08 10:45 +02:00 |
| Parents | e24e5cd01927 |
2 files changed
modified driver-core/src/main/java/com/datastax/driver/core/Cluster.java +2 −4
| @@ -24,7 +24,6 @@ | ||
| 24 | 24 | import java.util.concurrent.atomic.AtomicInteger; |
| 25 | 25 | import java.util.concurrent.atomic.AtomicReference; |
| 26 | 26 | |
| 27 | -import com.datastax.driver.core.exceptions.DriverException; | |
| 28 | 27 | import com.google.common.base.Predicates; |
| 29 | 28 | import com.google.common.collect.HashMultimap; |
| 30 | 29 | import com.google.common.collect.Iterables; |
| @@ -863,9 +862,8 @@ | ||
| 863 | 862 | * generated server-side, and setting a generator through this method will have |
| 864 | 863 | * no effect. |
| 865 | 864 | * <p> |
| 866 | - * If no generator is set through this method, the default | |
| 867 | - * {@link CountingTimestampGenerator} will be used. To force server-side | |
| 868 | - * timestamps with V3 or above, use {@link ServerSideTimestampGenerator}. | |
| 865 | + * If no generator is set through this method, the driver will default to the | |
| 866 | + * legacy server-side behavior by using {@link ServerSideTimestampGenerator}. | |
| 869 | 867 | * |
| 870 | 868 | * @param timestampGenerator the generator to use. |
| 871 | 869 | * @return this Builder. |
modified driver-core/src/main/java/com/datastax/driver/core/policies/Policies.java +3 −4
| @@ -15,7 +15,7 @@ | ||
| 15 | 15 | */ |
| 16 | 16 | package com.datastax.driver.core.policies; |
| 17 | 17 | |
| 18 | -import com.datastax.driver.core.CountingTimestampGenerator; | |
| 18 | +import com.datastax.driver.core.ServerSideTimestampGenerator; | |
| 19 | 19 | import com.datastax.driver.core.TimestampGenerator; |
| 20 | 20 | |
| 21 | 21 | /** |
| @@ -124,13 +124,12 @@ | ||
| 124 | 124 | /** |
| 125 | 125 | * The default timestamp generator. |
| 126 | 126 | * <p> |
| 127 | - * This is an instance of {@link CountingTimestampGenerator}. | |
| 127 | + * This is an instance of {@link ServerSideTimestampGenerator}. | |
| 128 | 128 | * |
| 129 | 129 | * @return the default timestamp generator. |
| 130 | 130 | */ |
| 131 | 131 | public static TimestampGenerator defaultTimestampGenerator() { |
| 132 | - // Create a new instance each time to avoid sharing between different Cluster instances. | |
| 133 | - return new CountingTimestampGenerator(); | |
| 132 | + return ServerSideTimestampGenerator.INSTANCE; | |
| 134 | 133 | } |
| 135 | 134 | |
| 136 | 135 | /** |