public class InMemoryEvaluationStore extends AbstractEvaluationStorage
| Modifier and Type | Class and Description |
|---|---|
static class |
InMemoryEvaluationStore.ResultPairImpl
A simple structure implementing the
ResultPair interface. |
AbstractEvaluationStorage.ExpectedResponseReceiver, AbstractEvaluationStorage.IterationRequestReceiver, AbstractEvaluationStorage.SystemResponseReceiver| Modifier and Type | Field and Description |
|---|---|
private Map<String,ResultPair> |
results
Map containing a mapping from task Ids to result pairs.
|
ackChannel, ackExchangeName, evalModule2EvalStoreQueue, EXPECTED_RESPONSE_STREAM_ID, expResponseReceiver, ITERATOR_ID_STREAM_ID, NEW_ITERATOR_ID, RECEIVE_TIMESTAMP_FOR_SYSTEM_RESULTS_KEY, RECEIVED_RESPONSE_STREAM_ID, receiveTimeStamp, replyingSenders, resultPairIterators, systemResponseReceiver, 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.
|
static byte[] |
putTimestampInFront(long timestamp,
byte[] data)
Copies timestamp and data in one single byte array starting with the
timestamp.
|
void |
receiveExpectedResponseData(String taskId,
long timestamp,
InputStream stream)
This method is called if an expected response is received from a task
generator component.
|
void |
receiveResponseData(String taskId,
long timestamp,
InputStream stream)
This method is called if a response is received from the system.
|
acknowledgeResponse, 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, InputStream stream)
ResponseReceivingComponenttaskId - the id of the tasktimestamp - the time at which the response has been received from the
systemstream - the data received from a data generatorpublic void receiveExpectedResponseData(String taskId, long timestamp, InputStream stream)
ExpectedResponseReceivingComponenttaskId - the id of the tasktimestamp - the time at which the task has been sent to the systempublic 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 AbstractEvaluationStoragepublic static byte[] putTimestampInFront(long timestamp,
byte[] data)
timestamp - a timestamp that belongs to the given datadata - Copyright © 2017–2018. All rights reserved.