use of com.axway.ats.log.autodb.LoadQueuesState in project ats-framework by Axway.
the class DbEventRequestProcessor method startCheckpoint.
private void startCheckpoint(StartCheckpointEvent startCheckpointEvent) throws LoggingException {
// check if checkpoints are enabled at all
if (appenderConfig.getEnableCheckpoints()) {
LoadQueuesState loadQueuesState = eventProcessorState.getLoadQueuesState();
int loadQueueId = loadQueuesState.getLoadQueueIdForThread(startCheckpointEvent.getThread());
if (loadQueueId > 0) {
final int testcaseId = eventProcessorState.getTestCaseId();
if (!deletedTestcases.contains(testcaseId)) {
try {
CheckpointInfo startedCheckpointInfo = dbAccess.startCheckpoint(startCheckpointEvent.getName(), startCheckpointEvent.getThread(), startCheckpointEvent.getStartTimestamp(), startCheckpointEvent.getTransferUnit(), loadQueueId, true);
loadQueuesState.startCheckpoint(startedCheckpointInfo, startCheckpointEvent.getThread());
} catch (LoggingException e) {
handleDeletedTestcase(e, testcaseId);
}
}
}
}
}
use of com.axway.ats.log.autodb.LoadQueuesState in project ats-framework by Axway.
the class DbEventRequestProcessor method insertCheckpoint.
private void insertCheckpoint(InsertCheckpointEvent insertCheckpointEvent) throws LoggingException {
// check if checkpoints are enabled at all
if (appenderConfig.getEnableCheckpoints()) {
LoadQueuesState loadQueuesState = eventProcessorState.getLoadQueuesState();
int loadQueueId = loadQueuesState.getLoadQueueIdForThread(insertCheckpointEvent.getThread());
final int testcaseId = eventProcessorState.getTestCaseId();
if (!deletedTestcases.contains(testcaseId)) {
try {
dbAccess.insertCheckpoint(insertCheckpointEvent.getName(), insertCheckpointEvent.getStartTimestamp(), insertCheckpointEvent.getResponseTime(), insertCheckpointEvent.getTransferSize(), insertCheckpointEvent.getTransferUnit(), insertCheckpointEvent.getResult().toInt(), loadQueueId, true);
} catch (LoggingException e) {
handleDeletedTestcase(e, testcaseId);
}
}
}
}
Aggregations