Search in sources :

Example 1 with LoadQueueAlreadyStartedException

use of com.axway.ats.log.autodb.exceptions.LoadQueueAlreadyStartedException in project ats-framework by Axway.

the class DbEventRequestProcessor method rememberLoadQueueState.

private void rememberLoadQueueState(RememberLoadQueueStateEvent startLoadQueueEvent) throws LoadQueueAlreadyStartedException {
    // first check if this load queue has already been started, just in case
    LoadQueuesState loadQueuesState = eventProcessorState.getLoadQueuesState();
    String loadQueueName = startLoadQueueEvent.getName();
    if (loadQueuesState.isLoadQueueRunning(loadQueueName)) {
        throw new LoadQueueAlreadyStartedException(loadQueueName);
    }
    // cache the load queue id
    loadQueuesState.addLoadQueue(loadQueueName, startLoadQueueEvent.getLoadQueueId());
}
Also used : LoadQueuesState(com.axway.ats.log.autodb.LoadQueuesState) LoadQueueAlreadyStartedException(com.axway.ats.log.autodb.exceptions.LoadQueueAlreadyStartedException)

Aggregations

LoadQueuesState (com.axway.ats.log.autodb.LoadQueuesState)1 LoadQueueAlreadyStartedException (com.axway.ats.log.autodb.exceptions.LoadQueueAlreadyStartedException)1