import com.google.common.base.Optional;
-import java.io.Closeable;
import java.io.IOException;
-import java.util.Set;
/**
* Base interface for persister implementation.
*/
-public interface Persister extends Closeable {
+public interface Persister extends AutoCloseable {
void persistConfig(ConfigSnapshotHolder configSnapshotHolder) throws IOException;
Optional<ConfigSnapshotHolder> loadLastConfig() throws IOException;
- public static interface ConfigSnapshotHolder {
+ @Override
+ void close();
- String getConfigSnapshot();
-
- Set<String> getCapabilities();
- }
}