Class PersistentSampler
java.lang.Object
de.ppi.deepsampler.persistence.api.PersistentSampler
public class PersistentSampler
extends java.lang.Object
The persistent sampler is the entry point for all operations regarding the persistence:
If you need to write/load your samples to other data-sources you can implement your own
- loading samples
- recording samples
To use the persistent you need a SourceManager, which will determine in which way
the samples have to be recorded/loaded.
If this prerequisite is fulfilled you can use {source(SourceManager)} to
start the definition of the persistent sample.
Example of using a json-SourceManager:
PersistentSampleManager.source(JsonSourceManager.builder("file.json")).record();
It's also possible to define multiple sources to record/load to/from multiple targets:
PersistentSampleManager.source(JsonSourceManager.builder("file.json"))
.source(JsonSourceManager.builder("file-copy.json"))
.record();
SourceManager which is capable of writing/loading to/from *.json files. To use it just include the project
persistence-json as maven dependency.
If you need to write/load your samples to other data-sources you can implement your own
SourceManager.-
Method Summary
Modifier and Type Method Description static PersistentSampleManagersource(SourceManager sourceManager)Entry method to load/record some samples.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
source
Entry method to load/record some samples. You have to build aSourceManager, responsible for interacting with the persistent data source (file, database, whatever you like).- Parameters:
sourceManager- theSourceManager- Returns:
- A new
PersistentSampleManager
-