All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.ppi.deepsampler.persistence.api.SourceManager Maven / Gradle / Ivy

There is a newer version: 2.1.0
Show newest version
/*
 * Copyright 2020  PPI AG (Hamburg, Germany)
 * This program is made available under the terms of the MIT License.
 */

package de.ppi.deepsampler.persistence.api;

import de.ppi.deepsampler.core.model.ExecutionInformation;
import de.ppi.deepsampler.persistence.PersistentSamplerContext;
import de.ppi.deepsampler.persistence.model.PersistentModel;

import java.util.Map;

/**
 * 

* A SourceManager is responsible for interacting with the actual persistent source. *

* * When implementing you have to define two methods: *
    *
  • save(...): Basically you have to write the provided data to your data source. There is no constraint on * how you do it, but you should write it in a form so that you are able to load it correctly again.
  • *
  • load(...): Load your data and transform your data to an implementation of {@link PersistentModel}
  • *
*/ public interface SourceManager { /** * Save the executionInformation collected on runtime to your data source. * * @param executionInformation the executionInformation mapped by class * @param persistentSamplerContext context of the persistent sampler */ void save(Map, ExecutionInformation> executionInformation, PersistentSamplerContext persistentSamplerContext); /** * Load the persistent data. You will also have to transform this (if not already happened by design) to an * implementation of {@link PersistentModel} and its subordinated interfaces. * * @return PersistentModel */ PersistentModel load(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy