package org.opendaylight.controller.config.persist.api;
-import com.google.common.base.Optional;
-
-import java.io.Closeable;
import java.io.IOException;
-import java.util.SortedSet;
+import java.util.List;
/**
* 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 {
-
- /**
- * Get part of get-config document that contains just
- */
- String getConfigSnapshot();
+ List<ConfigSnapshotHolder> loadLastConfigs() throws IOException;
+ @Override
+ void close();
- /**
- * Get only required capabilities referenced by the snapshot.
- */
- SortedSet<String> getCapabilities();
- }
}