Package org.springframework.core.task

Examples of org.springframework.core.task.SimpleAsyncTaskExecutor.submit()


    @Test
    public void testSubmissionMethod() throws InterruptedException, ExecutionException, TimeoutException {
        AsyncTaskExecutor executor = new SimpleAsyncTaskExecutor("testSubmissionMethod");
        SignallingRunnable runner = new SignallingRunnable("testSubmissionMethod");
        Future<?> future = executor.submit(runner);
        Object result = future.get(5L, TimeUnit.SECONDS);

        assertLastExecutionOperation(runner);
        assertCurrentThreadExecution();
View Full Code Here


    AsyncTaskExecutor executor = new SimpleAsyncTaskExecutor();

    for(int i = 0; i < 4; i++) {
      final long count = i;
      jobContexts.add(executor.submit(new Callable<JobContext>() {

        @Override
        public JobContext call() throws Exception {
          try {
            StepSynchronizationManager.register(new StepExecution("step" + count, new JobExecution(count)));
View Full Code Here

    AsyncTaskExecutor executor = new SimpleAsyncTaskExecutor();

    for(int i = 0; i < 4; i++) {
      final long count = i;
      stepContexts.add(executor.submit(new Callable<StepContext>() {

        @Override
        public StepContext call() throws Exception {
          try {
            StepSynchronizationManager.register(new StepExecution("step" + count, new JobExecution(count)));
View Full Code Here

    AsyncTaskExecutor executor = new SimpleAsyncTaskExecutor();

    for(int i = 0; i < 4; i++) {
      final long count = i;
      stepContexts.add(executor.submit(new Callable<StepContext>() {

        @Override
        public StepContext call() throws Exception {
          try {
            StepSynchronizationManager.register(new StepExecution("step" + count, new JobExecution(count)));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.