Class Policies.Builder
- java.lang.Object
-
- com.datastax.driver.core.policies.Policies.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Policiesbuild()Builds the final object from this builder.Policies.BuilderwithAddressTranslator(AddressTranslator addressTranslator)Sets the address translator.Policies.BuilderwithEndPointFactory(EndPointFactory endPointFactory)Policies.BuilderwithLoadBalancingPolicy(LoadBalancingPolicy loadBalancingPolicy)Sets the load balancing policy.Policies.BuilderwithReconnectionPolicy(ReconnectionPolicy reconnectionPolicy)Sets the reconnection policy.Policies.BuilderwithRetryPolicy(RetryPolicy retryPolicy)Sets the retry policy.Policies.BuilderwithSpeculativeExecutionPolicy(SpeculativeExecutionPolicy speculativeExecutionPolicy)Sets the speculative execution policy.Policies.BuilderwithTimestampGenerator(TimestampGenerator timestampGenerator)Sets the timestamp generator.
-
-
-
Method Detail
-
withLoadBalancingPolicy
public Policies.Builder withLoadBalancingPolicy(LoadBalancingPolicy loadBalancingPolicy)
Sets the load balancing policy.- Parameters:
loadBalancingPolicy- seePolicies.getLoadBalancingPolicy().- Returns:
- this builder.
-
withReconnectionPolicy
public Policies.Builder withReconnectionPolicy(ReconnectionPolicy reconnectionPolicy)
Sets the reconnection policy.- Parameters:
reconnectionPolicy- seePolicies.getReconnectionPolicy().- Returns:
- this builder.
-
withRetryPolicy
public Policies.Builder withRetryPolicy(RetryPolicy retryPolicy)
Sets the retry policy.- Parameters:
retryPolicy- seePolicies.getRetryPolicy().- Returns:
- this builder.
-
withAddressTranslator
public Policies.Builder withAddressTranslator(AddressTranslator addressTranslator)
Sets the address translator.- Parameters:
addressTranslator- seePolicies.getAddressTranslator().- Returns:
- this builder.
-
withTimestampGenerator
public Policies.Builder withTimestampGenerator(TimestampGenerator timestampGenerator)
Sets the timestamp generator.- Parameters:
timestampGenerator- seePolicies.getTimestampGenerator().- Returns:
- this builder.
-
withSpeculativeExecutionPolicy
public Policies.Builder withSpeculativeExecutionPolicy(SpeculativeExecutionPolicy speculativeExecutionPolicy)
Sets the speculative execution policy.- Parameters:
speculativeExecutionPolicy- seePolicies.getSpeculativeExecutionPolicy().- Returns:
- this builder.
-
withEndPointFactory
public Policies.Builder withEndPointFactory(EndPointFactory endPointFactory)
-
build
public Policies build()
Builds the final object from this builder.Any field that hasn't been set explicitly will get its default value.
- Returns:
- the object.
-
-