Interface DataStorage<R extends FactoryBase<?,?>,S>
-
- Type Parameters:
R- RootS- Change summary
- All Known Implementing Classes:
FileSystemDataStorage,InMemoryDataStorage
public interface DataStorage<R extends FactoryBase<?,?>,S>storage/load and history for factories
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddFutureData(ScheduledUpdate<R> futureData)voiddeleteFutureData(java.lang.String id)DataAndId<R>getCurrentData()get the current data, if first start or no available an initial data is createdRgetFutureData(java.lang.String id)java.util.Collection<ScheduledUpdateMetadata>getFutureDataList()RgetHistoryData(java.lang.String id)java.util.Collection<StoredDataMetadata<S>>getHistoryDataList()voidpatchAll(DataStoragePatcher consumer)for one-time migration apply patch to all stored data including history, changes to jsonNodes are storedvoidpatchCurrentData(DataStoragePatcher consumer)for one-time migration apply patch to current datavoidupdateCurrentData(DataUpdate<R> update, S changeSummary)updateCurrentData and history
-
-
-
Method Detail
-
getHistoryData
R getHistoryData(java.lang.String id)
-
getHistoryDataList
java.util.Collection<StoredDataMetadata<S>> getHistoryDataList()
-
getFutureDataList
java.util.Collection<ScheduledUpdateMetadata> getFutureDataList()
-
deleteFutureData
void deleteFutureData(java.lang.String id)
-
getFutureData
R getFutureData(java.lang.String id)
-
addFutureData
void addFutureData(ScheduledUpdate<R> futureData)
- Parameters:
futureData- futureData
-
getCurrentData
DataAndId<R> getCurrentData()
get the current data, if first start or no available an initial data is created- Returns:
- current data
-
updateCurrentData
void updateCurrentData(DataUpdate<R> update, S changeSummary)
updateCurrentData and history- Parameters:
update- updatechangeSummary- changeSummary
-
patchAll
void patchAll(DataStoragePatcher consumer)
for one-time migration apply patch to all stored data including history, changes to jsonNodes are stored- Parameters:
consumer- called for all stored factories
-
patchCurrentData
void patchCurrentData(DataStoragePatcher consumer)
for one-time migration apply patch to current data- Parameters:
consumer- called for current factory, changes to jsonNodes are stored
-
-