org.stuartgunter.dropwizard.cassandra.pooling.HostDistanceOptions 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
Dropwizard Bundle for Cassandra
                
             The newest version!
        
        /*
 * Copyright 2014 Stuart Gunter
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */
package org.stuartgunter.dropwizard.cassandra.pooling;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.validation.constraints.Min;
/**
 * A factory for configuring and building {@link com.datastax.driver.core.PoolingOptions} instances.
 * 
 * Configuration Parameters:
 * 
 *     
 *         Name 
 *         Default 
 *         Description 
 *      
 *     
 *         minSimultaneousRequests 
 *         No default. You must specify minimum simultaneous requests. 
 *         The number of simultaneous requests on a connection below which connections in excess are reclaimed. 
 *      
 *     
 *         maxSimultaneousRequests 
 *         No default. You must specify maximum simultaneous requests. 
 *         The number of simultaneous requests on all connections to an host after which more connections are created. 
 *      
 *     
 *         coreConnections 
 *         No default. You must specify core connections. 
 *         The core number of connections per host. 
 *      
 *     
 *         maxConnections 
 *         No default. You must specify maximum connections. 
 *         The maximum number of connections per host. 
 *      
 * 
 */
public class HostDistanceOptions {
    @Min(0)
    private Integer minSimultaneousRequests;
    @Min(0)
    private Integer maxSimultaneousRequests;
    @Min(0)
    private Integer coreConnections;
    @Min(0)
    private Integer maxConnections;
    @JsonProperty
    public Integer getMinSimultaneousRequests() {
        return minSimultaneousRequests;
    }
    @JsonProperty
    public void setMinSimultaneousRequests(Integer minSimultaneousRequests) {
        this.minSimultaneousRequests = minSimultaneousRequests;
    }
    @JsonProperty
    public Integer getMaxSimultaneousRequests() {
        return maxSimultaneousRequests;
    }
    @JsonProperty
    public void setMaxSimultaneousRequests(Integer maxSimultaneousRequests) {
        this.maxSimultaneousRequests = maxSimultaneousRequests;
    }
    @JsonProperty
    public Integer getCoreConnections() {
        return coreConnections;
    }
    @JsonProperty
    public void setCoreConnections(Integer coreConnections) {
        this.coreConnections = coreConnections;
    }
    @JsonProperty
    public Integer getMaxConnections() {
        return maxConnections;
    }
    @JsonProperty
    public void setMaxConnections(Integer maxConnections) {
        this.maxConnections = maxConnections;
    }
}
    © 2015 - 2025 Weber Informatics LLC | Privacy Policy