title: Delay a job for certain period of time and pick up again
body: <p>i have a java class, which writes data to a database and then sends for each written row a  message to REDIS channel. Now I only want to send the REDIS message after a 5 second delay though. </p>
  
  <p>right now the program does this: </p>
  
  <pre><code>List&lt;Future&lt;T&gt;&gt; futures = threadPool.invokeAll(tasks, timeoutSeconds, TimeUnit.SECONDS);
  </code></pre>
  
  <p>each task corresponds to a publish to a REDIS channel. How can i delay the sending of all these tasks for 5 seconds and how can i go sure that after 5 seconds the job is picked up by one worker thread only, in case the main thread dies?</p>
  
  <p>i was thinking about using a ScheduledExecutorService and run the service as a standalone service. When assigned a job with schedule, then it delays for 5 seconds and then it assigns a worker from its pool to do the job. </p>
  
  <p>Do i need something like Curator Framework and locking mechanism here? </p>
  
  <p>What would be a good design?
  Thanks</p>