org.apache.kafka.connect.storage.ConfigBackingStore Maven / Gradle / Ivy
/*
* 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.kafka.connect.storage;
import org.apache.kafka.connect.runtime.TargetState;
import org.apache.kafka.connect.runtime.distributed.ClusterConfigState;
import org.apache.kafka.connect.util.ConnectorTaskId;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
public interface ConfigBackingStore {
void start();
void stop();
/**
* Get a snapshot of the current configuration state including all connector and task
* configurations.
* @return the cluster config state
*/
ClusterConfigState snapshot();
/**
* Check if the store has configuration for a connector.
* @param connector name of the connector
* @return true if the backing store contains configuration for the connector
*/
boolean contains(String connector);
/**
* Update the configuration for a connector.
* @param connector name of the connector
* @param properties the connector configuration
*/
void putConnectorConfig(String connector, Map properties);
/**
* Remove configuration for a connector
* @param connector name of the connector
*/
void removeConnectorConfig(String connector);
/**
* Update the task configurations for a connector.
* @param connector name of the connector
* @param configs the new task configs for the connector
*/
void putTaskConfigs(String connector, List