public class InMemoryEvaluationStore extends AbstractEvaluationStorage
| Modifier and Type | Class and Description |
|---|---|
static class |
InMemoryEvaluationStore.ResultImpl
A simple structure implementing the
Result interface |
static class |
InMemoryEvaluationStore.ResultPairImpl
A simple structure implementing the
ResultPair interface. |
| Modifier and Type | Field and Description |
|---|---|
private Map<String,ResultPair> |
results
Map containing a mapping from task Ids to result pairs.
|
ackChannel, evalModule2EvalStoreQueue, NEW_ITERATOR_ID, RECEIVE_TIMESTAMP_FOR_SYSTEM_RESULTS_KEY, resultPairIterators, systemResultReceiver, taskResultReceivercmdChannel, cmdQueueFactory, DEFAULT_CMD_RESPONSE_TIMEOUT, defaultContainerTypeconnectionFactory, incomingDataQueueFactory, NUMBER_OF_RETRIES_TO_CONNECT_TO_RABBIT_MQ, outgoingDataQueuefactory, rabbitMQHostName, START_WAITING_TIME_BEFORE_RETRY| Constructor and Description |
|---|
InMemoryEvaluationStore() |
| Modifier and Type | Method and Description |
|---|---|
protected Iterator<ResultPair> |
createIterator()
Creates a new iterator that iterates over the response pairs.
|
void |
putResult(boolean isExpectedResult,
String taskId,
long timestamp,
byte[] data)
Adds the given result to the map of results.
|
void |
receiveExpectedResponseData(String taskId,
long timestamp,
byte[] data)
This method is called if an expected response is received from a task
generator component.
|
void |
receiveResponseData(String taskId,
long timestamp,
byte[] data)
This method is called if a response is received from the system.
|
close, init, receiveCommand, runaddContainerObserver, createContainer, getFactoryForIncomingCmdQueues, getFactoryForIncomingDataQueues, getFactoryForOutgoingCmdQueues, getFactoryForOutgoingDataQueues, stopContaineraddCommandHeaderId, createContainer, createContainer, handleCmd, sendToCmdQueue, sendToCmdQueue, sendToCmdQueuecreateConnection, generateSessionQueueName, getHobbitSessionIdprivate Map<String,ResultPair> results
public void receiveResponseData(String taskId, long timestamp, byte[] data)
ResponseReceivingComponenttaskId - the id of the tasktimestamp - the time at which the response has been received from the
systemdata - the data received from a data generatorpublic void receiveExpectedResponseData(String taskId, long timestamp, byte[] data)
ExpectedResponseReceivingComponenttaskId - the id of the tasktimestamp - the time at which the task has been sent to the systemdata - the data received from a task generatorpublic void putResult(boolean isExpectedResult,
String taskId,
long timestamp,
byte[] data)
isExpectedResult - true if the result has been received from a task generator,
i.e., is the expected result for a tasktaskId - id of the tasktimestamp - time stamp for the task resultdata - the resultprotected Iterator<ResultPair> createIterator()
AbstractEvaluationStoragecreateIterator in class AbstractEvaluationStorageCopyright © 2017–2018. All rights reserved.