@Test(expected = WorkerspaceQueueException.class) public void whenTransferThenRunnerNotStartedKO() throws WorkerspaceQueueException { WorkspaceQueue workspaceQueue = mock(WorkspaceQueue.class); HandlerIO handlerIO = mock(HandlerIOImpl.class); Executor executor = mock(Executor.class); WorkspaceBatchRunner workspaceBatchRunner = new WorkspaceBatchRunner(handlerIO, executor, 10); workspaceBatchRunner.transfer(workspaceQueue); }
public void transfer(WorkspaceQueue workspaceQueue) throws WorkerspaceQueueException { ParametersChecker.checkParameter("WorkspaceQueue is required", workspaceQueue); if (!started) { throw new WorkerspaceQueueException("Workspace batch runner not started"); } try { queue.put(workspaceQueue); } catch (InterruptedException e) { LOGGER.error(e); throw new WorkerspaceQueueException(e); } }
WorkspaceBatchRunner implements Runnable { public void transfer(WorkspaceQueue workspaceQueue) throws WorkerspaceQueueException { ParametersChecker.checkParameter("WorkspaceQueue is required", workspaceQueue); if (!started) { throw new WorkerspaceQueueException("Workspace batch runner not started"); } try { queue.put(workspaceQueue); } catch (InterruptedException e) { LOGGER.error(e); throw new WorkerspaceQueueException(e); } } }
WorkspaceBatchRunner implements Runnable { public void transfer(WorkspaceQueue workspaceQueue) throws WorkerspaceQueueException { ParametersChecker.checkParameter("WorkspaceQueue is required", workspaceQueue); if (!started) { throw new WorkerspaceQueueException("Workspace batch runner not started"); } try { queue.put(workspaceQueue); } catch (InterruptedException e) { LOGGER.error(e); throw new WorkerspaceQueueException(e); } } WorkspaceBatchRunner(HandlerIO handlerAsyncIO, Executor executor, int queueSize); }
WorkspaceBatchRunner implements Runnable { public void transfer(WorkspaceQueue workspaceQueue) throws WorkerspaceQueueException { ParametersChecker.checkParameter("WorkspaceQueue is required", workspaceQueue); if (!started) { throw new WorkerspaceQueueException("Workspace batch runner not started"); } try { queue.put(workspaceQueue); } catch (InterruptedException e) { LOGGER.error(e); throw new WorkerspaceQueueException(e); } } WorkspaceBatchRunner(HandlerIO handlerAsyncIO, Executor executor, int queueSize); @Override void run(); void transfer(WorkspaceQueue workspaceQueue); void start(); void join(); }
WorkspaceBatchRunner implements Runnable { public void transfer(WorkspaceQueue workspaceQueue) throws WorkerspaceQueueException { ParametersChecker.checkParameter("WorkspaceQueue is required", workspaceQueue); if (!started) { throw new WorkerspaceQueueException("Workspace batch runner not started"); } try { queue.put(workspaceQueue); } catch (InterruptedException e) { LOGGER.error(e); throw new WorkerspaceQueueException(e); } } WorkspaceBatchRunner(HandlerIO handlerAsyncIO, Executor executor, int queueSize); @Override void run(); void transfer(WorkspaceQueue workspaceQueue); void start(); void join();  }