blob: 8086164821e885b570ef5ff9fd75a9ae09f7337e [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.apache.cassandra.sidecar;
/**
* Sidecar configuration
*/
public class Configuration
{
/* Cassandra Host */
private final String cassandraHost;
/* Cassandra Port */
private final Integer cassandraPort;
/* Sidecar's HTTP REST API port */
private final Integer port;
/* Healthcheck frequency in miilis */
private final Integer healthCheckFrequencyMillis;
/**
* Constructor
*
* @param cassandraHost
* @param cassandraPort
* @param port
* @param healthCheckFrequencyMillis
*/
public Configuration(String cassandraHost, Integer cassandraPort, Integer port,
Integer healthCheckFrequencyMillis)
{
this.cassandraHost = cassandraHost;
this.cassandraPort = cassandraPort;
this.port = port;
this.healthCheckFrequencyMillis = healthCheckFrequencyMillis;
}
/**
* Get the Cassandra host
*
* @return
*/
public String getCassandraHost()
{
return cassandraHost;
}
/**
* Get the Cassandra port
*
* @return
*/
public Integer getCassandraPort()
{
return cassandraPort;
}
/**
* Get the Sidecar's REST HTTP API port
*
* @return
*/
public Integer getPort()
{
return port;
}
/**
* Get the health check frequency in millis
*
* @return
*/
public Integer getHealthCheckFrequencyMillis()
{
return healthCheckFrequencyMillis;
}
}