public class JsonResultManager extends Object implements ResultManager
ResultManager.DummyManager, ResultManager.PrintingManager
Constructor and Description |
---|
JsonResultManager(int experimentID,
String url,
AltoLabHttpClient labClient) |
Modifier and Type | Method and Description |
---|---|
void |
acceptError(Throwable error,
int instanceID,
String name,
boolean doExport,
boolean isGlobal)
If an error occurred during the computation of the variable with the given name,
this is called.
|
void |
acceptResult(Object result,
int instanceID,
String name,
boolean doExport,
boolean isGlobal,
boolean isNumeric)
Accpets a result for the variable with the given name, for the given instance.
|
void |
acceptTime(long time,
int instanceID,
String name,
boolean isGlobal)
Accepts a runtime for the watch with the given name, for the given instance.
|
void |
finish()
Marks the experiment as finished.
|
void |
flush()
Send data to the persistent storage.
|
int |
getExperimentID()
Returns the experiment ID in this result manager.
|
public JsonResultManager(int experimentID, String url, AltoLabHttpClient labClient)
public void acceptResult(Object result, int instanceID, String name, boolean doExport, boolean isGlobal, boolean isNumeric)
ResultManager
acceptResult
in interface ResultManager
isNumeric
- whether the result is of numeric value (double, int,... or the wrapper class). Relevant mostly if result is null.public void acceptTime(long time, int instanceID, String name, boolean isGlobal)
ResultManager
acceptTime
in interface ResultManager
public void acceptError(Throwable error, int instanceID, String name, boolean doExport, boolean isGlobal)
ResultManager
acceptError
in interface ResultManager
public void flush() throws IOException
ResultManager
flush
in interface ResultManager
IOException
public int getExperimentID()
ResultManager
getExperimentID
in interface ResultManager
public void finish() throws Exception
ResultManager
finish
in interface ResultManager
Exception
Copyright © 2017. All rights reserved.