public interface IExperimentDatabaseHandle
| Modifier and Type | Method and Description |
|---|---|
ExperimentDBEntry |
createAndGetExperiment(Experiment experiment)
Creates a new experiment entry and returns it.
|
java.util.List<ExperimentDBEntry> |
createAndGetExperiments(java.util.List<Experiment> experiments)
Creates a new experiment entry and returns it.
|
void |
deleteDatabase()
Deletes everything known to the experiment database.
|
void |
deleteExperiment(ExperimentDBEntry exp)
Deletes an experiment from the database
|
void |
finishExperiment(ExperimentDBEntry exp)
Signals that an experiment has been finished successfully.
|
void |
finishExperiment(ExperimentDBEntry exp,
java.lang.Throwable errror)
Signals that an experiment has failed with an exception.
|
java.util.List<ExperimentDBEntry> |
getAllExperiments()
Returns a list of all experiments contained in the database
|
java.util.List<ExperimentDBEntry> |
getConductedExperiments()
Returns a list of all experiments contained in the database marked as being conducted.
|
java.util.Collection<java.lang.String> |
getConsideredValuesForKey(java.lang.String key) |
ExperimentDBEntry |
getExperimentWithId(int id)
Gets the experiment with the given id.
|
int |
getNumberOfAllExperiments()
Returns a list of all experiments contained in the database
|
java.util.List<ExperimentDBEntry> |
getOpenExperiments()
Returns a list of all experiments contained in the database that have not been started yet.
|
java.util.List<ExperimentDBEntry> |
getRandomOpenExperiments(int limit)
Returns a list of all experiments contained in the database that have not been started yet.
|
java.util.List<ExperimentDBEntry> |
getRunningExperiments()
Returns a list of all experiments that are currently being conducted.
|
void |
setup(IExperimentSetConfig config)
Prepares everything so that upcoming calls for create and update will be managed according to the specified configuration.
|
void |
startExperiment(ExperimentDBEntry exp)
Updates non-keyfield values of the experiment.
|
void |
updateExperiment(ExperimentDBEntry exp,
java.util.Map<java.lang.String,? extends java.lang.Object> values)
Updates non-keyfield values of the experiment.
|
boolean |
updateExperimentConditionally(ExperimentDBEntry exp,
java.util.Map<java.lang.String,java.lang.String> conditions,
java.util.Map<java.lang.String,? extends java.lang.Object> values) |
void setup(IExperimentSetConfig config) throws ExperimentDBInteractionFailedException
config - Description of the experiment setupExperimentDBInteractionFailedExceptionjava.util.Collection<java.lang.String> getConsideredValuesForKey(java.lang.String key)
throws ExperimentDBInteractionFailedException
key - The key attributeExperimentDBInteractionFailedExceptionjava.util.List<ExperimentDBEntry> getAllExperiments() throws ExperimentDBInteractionFailedException
ExperimentDBInteractionFailedExceptionint getNumberOfAllExperiments()
throws ExperimentDBInteractionFailedException
java.util.List<ExperimentDBEntry> getConductedExperiments() throws ExperimentDBInteractionFailedException
ExperimentDBInteractionFailedExceptionjava.util.List<ExperimentDBEntry> getOpenExperiments() throws ExperimentDBInteractionFailedException
ExperimentDBInteractionFailedExceptionjava.util.List<ExperimentDBEntry> getRandomOpenExperiments(int limit) throws ExperimentDBInteractionFailedException
limit - Maximum number of open experiments that should be returnedExperimentDBInteractionFailedExceptionjava.util.List<ExperimentDBEntry> getRunningExperiments() throws ExperimentDBInteractionFailedException
ExperimentDBInteractionFailedExceptionExperimentDBEntry getExperimentWithId(int id) throws ExperimentDBInteractionFailedException
id - ExperimentDBInteractionFailedExceptionExperimentDBEntry createAndGetExperiment(Experiment experiment) throws ExperimentDBInteractionFailedException, ExperimentAlreadyExistsInDatabaseException
experiment - ExperimentDBInteractionFailedExceptionExperimentAlreadyExistsInDatabaseExceptionjava.util.List<ExperimentDBEntry> createAndGetExperiments(java.util.List<Experiment> experiments) throws ExperimentDBInteractionFailedException, ExperimentAlreadyExistsInDatabaseException
experiments - the experiments to be createdExperimentDBInteractionFailedExceptionExperimentAlreadyExistsInDatabaseExceptionvoid startExperiment(ExperimentDBEntry exp) throws ExperimentAlreadyStartedException, ExperimentUpdateFailedException
exp - The experiment that is started on the current machineExperimentUpdateFailedExceptionExperimentAlreadyStartedExceptionvoid updateExperiment(ExperimentDBEntry exp, java.util.Map<java.lang.String,? extends java.lang.Object> values) throws ExperimentUpdateFailedException
exp - The experiment entry in the databasevalues - A key-value store where keys are names of result fields. The values will be associated to each key in the database.ExperimentUpdateFailedExceptionboolean updateExperimentConditionally(ExperimentDBEntry exp, java.util.Map<java.lang.String,java.lang.String> conditions, java.util.Map<java.lang.String,? extends java.lang.Object> values) throws ExperimentUpdateFailedException
ExperimentUpdateFailedExceptionvoid finishExperiment(ExperimentDBEntry exp) throws ExperimentDBInteractionFailedException
exp - ExperimentDBInteractionFailedExceptionvoid finishExperiment(ExperimentDBEntry exp, java.lang.Throwable errror) throws ExperimentDBInteractionFailedException
exp - errror - ExperimentDBInteractionFailedExceptionvoid deleteExperiment(ExperimentDBEntry exp) throws ExperimentDBInteractionFailedException
exp - ExperimentDBInteractionFailedExceptionvoid deleteDatabase()
throws ExperimentDBInteractionFailedException