Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 2.0.1.qualifier
+Bundle-Version: 2.1.0.qualifier
Bundle-Localization: plugin
Bundle-SymbolicName: org.eclipse.tracecompass.statesystem.core;singleton:=true
Bundle-Activator: org.eclipse.tracecompass.internal.statesystem.core.Activator
* know how to handle it.
*/
void closeHistory(long endTime);
+
+ /**
+ * Delete any generated files or anything that might have been created by
+ * the history backend (either temporary or save files). By calling this, we
+ * return to the state as it was before ever building the history.
+ *
+ * You might not want to call automatically if, for example, you want an
+ * index file to persist on disk. This could be limited to actions
+ * originating from the user.
+ *
+ * FIXME Change to abstract for 3.0
+ *
+ * @since 2.1
+ */
+ default void removeFiles() {
+ // FIXME Change to abstract for 3.0
+ }
}
private final Object fRequestSyncObj = new Object();
private @Nullable ITmfStateSystemBuilder fStateSystem;
- private @Nullable IStateHistoryBackend fHtBackend;
private @Nullable ITmfEventRequest fRequest;
private @Nullable TmfTimeRange fTimeRange = null;
try {
IStateHistoryBackend backend = StateHistoryBackendFactory.createHistoryTreeBackendExistingFile(
id, htFile, version);
- fHtBackend = backend;
fStateSystem = StateSystemFactory.newStateSystem(backend, false);
analysisReady(true);
return;
try {
IStateHistoryBackend backend = StateHistoryBackendFactory.createHistoryTreeBackendNewFile(
id, htFile, provider.getVersion(), provider.getStartTime(), QUEUE_SIZE);
- fHtBackend = backend;
fStateSystem = StateSystemFactory.newStateSystem(backend);
provider.assignTargetStateSystem(fStateSystem);
build(provider);
provider.assignTargetStateSystem(realSS);
/* 7 */
- fHtBackend = partialBackend;
fStateSystem = realSS;
build(provider);
*/
private void createNullHistory(String id, ITmfStateProvider provider) {
IStateHistoryBackend backend = StateHistoryBackendFactory.createNullBackend(id);
- fHtBackend = backend;
fStateSystem = StateSystemFactory.newStateSystem(backend);
provider.assignTargetStateSystem(fStateSystem);
build(provider);
*/
private void createInMemoryHistory(String id, ITmfStateProvider provider) {
IStateHistoryBackend backend = StateHistoryBackendFactory.createInMemoryBackend(id, provider.getStartTime());
- fHtBackend = backend;
fStateSystem = StateSystemFactory.newStateSystem(backend);
provider.assignTargetStateSystem(fStateSystem);
build(provider);
provider.dispose();
}
fStateProvider = null;
- if (deleteFiles && (fHtBackend != null)) {
- fHtBackend.removeFiles();
+ if (deleteFiles && (fStateSystem != null)) {
+ fStateSystem.removeFiles();
}
}
private void build(ITmfStateProvider provider) {
- if ((fStateSystem == null) || (fHtBackend == null)) {
+ if (fStateSystem == null) {
throw new IllegalArgumentException();
}