blob: f79e6f68f5ba74e7070ae360ca2b28882330352c [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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.streams.processor;
/**
* A storage engine for managing state maintained by a stream processor.
*
* <p>
* This interface does not specify any query capabilities, which, of course,
* would be query engine specific. Instead it just specifies the minimum
* functionality required to reload a storage engine from its changelog as well
* as basic lifecycle management.
* </p>
*/
public interface StateStore {
/**
* The name of this store.
* @return the storage name
*/
String name();
/**
* Initializes this state store
*/
void init(ProcessorContext context, StateStore root);
/**
* Flush any cached data
*/
void flush();
/**
* Close the storage engine
*/
void close();
/**
* Return if the storage is persistent or not.
*
* @return {@code true} if the storage is persistent&mdash;{@code false} otherwise
*/
boolean persistent();
}