ScheduledExecutorService « Operation « Java Thread Q&A

Home
Java Thread Q&A
1.concurrency
2.Development
3.Exception
4.Notify
5.Operation
6.Socket
7.State
8.synchronize
9.Thread Safe
10.ThreadPool
Java Thread Q&A » Operation » ScheduledExecutorService 

1. using ScheduledExecutorService to start and stop timer    stackoverflow.com

From my readings, it seems that ScheduledExecutorService is the right way to start and stop timers in Java. I need to port some code that starts and stops a timer. This is ...

2. ScheduledExecutorService Life Cycle?    stackoverflow.com

I have an object that needs to do periodically do some work while the object itself is alive, so I designed something like the following. Basically a Main class which contains ...

3. Why does ScheduledExecutorService not expose methods to run at a particular time    stackoverflow.com

If I want to schedule at recurring task that is aligned with a specific date it would make sense to use ScheduledExecutorService. But it has no method to pass in ...

4. ScheduledExecutorService start stop several times    stackoverflow.com

I am using ScheduledExecutorService, and after I call it's shutdown method, I can't schedule a Runnable on it. Calling scheduleAtFixedRate(runnable, INITIAL_DELAY, ...

5. Why does a ScheduledExecutorService not run a task again after an exception is thrown?    stackoverflow.com

For executing periodical tasks, I looked at Timer and ScheduledThreadPoolExecutor (with a single thread) and decided to use the latter, because in the reference for ...

6. Pause ScheduledExecutorService    stackoverflow.com

I am using a ScheduledExecutorService to execute a task that calls a service at a fixed rate. The service may return some data to the task. The task stores data in ...

7. Scheduling an Applet start with ScheduledExecutorService    stackoverflow.com

I have a simple Clock Applet that I would like to be able to control via the ScheduledExecutorService, however I'm a little unsure as to how to make the thread start ...

8. ScheduledExecutorService multiple threads in paralel    stackoverflow.com

I'm interested to use ScheduledExecutorService to spawn multiple threads for tasks if task before did not yet finished. For example I need to process a file every 0.5s. First task starts ...

9. Under what conditions does the ScheduledExecutorService start the task on new threads (JDK 5)    coderanch.com

Howdy! I'm playing around with the ScheduledExecutorService scheduler. In the code i first init the scheduler with a fixed thread pool size and then pass it a simple task which keeps refreshing a shared list with new data, periodically. At random, the task might throw a runtime exception, in which case the scheduler should start a new thread, but i don't ...

11. Does ScheduledExecutorService.shutdown kill all threads ?    forums.oracle.com

Does ScheduledExecutorService.shutdown() kill all threads, even those threads that are not scheduled by it ? I ask because when i do a ScheduledExecutorService.shutdown(), it will somehows stop all my other threads and program does not follow the follow flow... which is caused by scheduler.shutdown(). What will be a better way to stop the task which is assigned to the scheduler ? ...

12. How to build a ScheduledExecutorService given an Executor    forums.oracle.com

Hi, I want to use a ScheduledExecutorService in my program. However, due to various limitations, I don't have a ThreadFactory so I cannot use Java's ScheduledThreadPoolExecutor. What I have is an Executor (passed in by other codes). This seems to be a very general problem: building a ScheduledExecutorService based on a given Executor. Does anyone have solved this before? Would you ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.