+
+ @Override
+ public Snapshot getRestoreFromSnapshot() {
+ return null;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public Snapshot.State deserializeSnapshot(ByteSource snapshotBytes) {
+ try {
+ return new MapState((Map<String, String>) SerializationUtils.deserialize(snapshotBytes.read()));
+ } catch (IOException e) {
+ throw Throwables.propagate(e);
+ }
+ }
+
+ private static class MapState implements Snapshot.State {
+ private static final long serialVersionUID = 1L;
+
+ Map<String, String> state;
+
+ MapState(Map<String, String> state) {
+ this.state = state;
+ }
+ }