systems.composable.dropwizard.cassandra.loadbalancing.LoadBalancingPolicyFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dropwizard-cassandra Show documentation
Show all versions of dropwizard-cassandra Show documentation
Cassandra library for Dropwizard
The newest version!
package systems.composable.dropwizard.cassandra.loadbalancing;
import com.datastax.driver.core.policies.LoadBalancingPolicy;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import io.dropwizard.jackson.Discoverable;
/**
* A service provider interface for creating DataStax {@link LoadBalancingPolicy load balancing policies}.
*
* To create your own, just:
*
* - Create a class which implements {@link LoadBalancingPolicyFactory}.
* - Annotate it with {@code @JsonTypeName} and give it a unique type name.
* - Add a {@code META-INF/services/systems.composable.dropwizard.cassandra.loadbalancing.LoadBalancingPolicyFactory}
* file with your implementation's full class name to the class path.
*
*
* @see DCAwareRoundRobinPolicyFactory
* @see LatencyAwarePolicyFactory
* @see RoundRobinPolicyFactory
* @see TokenAwarePolicyFactory
* @see WhiteListPolicyFactory
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
public interface LoadBalancingPolicyFactory extends Discoverable {
LoadBalancingPolicy build();
}