From d479253768d296a40b4f699e1de9b03c7146a97a Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Tue, 3 Dec 2013 14:03:28 -0800 Subject: Adding javadocs and Carbonado User Guide --- .../com/amazon/carbonado/util/TaskQueueThread.html | 402 +++++++++++++++++++++ 1 file changed, 402 insertions(+) create mode 100644 apidocs/com/amazon/carbonado/util/TaskQueueThread.html (limited to 'apidocs/com/amazon/carbonado/util/TaskQueueThread.html') diff --git a/apidocs/com/amazon/carbonado/util/TaskQueueThread.html b/apidocs/com/amazon/carbonado/util/TaskQueueThread.html new file mode 100644 index 0000000..441eb60 --- /dev/null +++ b/apidocs/com/amazon/carbonado/util/TaskQueueThread.html @@ -0,0 +1,402 @@ + + + + + + +TaskQueueThread (Carbonado 1.2.3 API) + + + + + + + +
+ + + + + +
+ + + +
+
com.amazon.carbonado.util
+

Class TaskQueueThread

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.lang.Runnable, java.util.concurrent.Executor
    +
    +
    +
    +
    public class TaskQueueThread
    +extends java.lang.Thread
    +implements java.util.concurrent.Executor
    +
    Simple generic queue for running tasks from a single thread. Be sure to call + shutdown or interrupt when done using the thread, or else it will never exit.
    +
    Author:
    +
    Brian S O'Neill
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class java.lang.Thread

        +java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      +
        +
      • + + +

        Fields inherited from class java.lang.Thread

        +MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + +
      Constructors 
      Constructor and Description
      TaskQueueThread(java.lang.String name, + int queueSize) 
      TaskQueueThread(java.lang.String name, + int queueSize, + long timeoutMillis) 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      voidexecute(java.lang.Runnable task) +
      Enqueue a task to run.
      +
      voidexecute(java.lang.Runnable task, + long timeoutMillis) +
      Enqueue a task to run.
      +
      voidrun() 
      voidshutdown() +
      Indicate that this task queue thread should finish running its enqueued + tasks and then exit.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Thread

        +activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        TaskQueueThread

        +
        public TaskQueueThread(java.lang.String name,
        +               int queueSize)
        +
        Parameters:
        name - name to give this thread
        queueSize - fixed size of queue
        +
      • +
      + + + +
        +
      • +

        TaskQueueThread

        +
        public TaskQueueThread(java.lang.String name,
        +               int queueSize,
        +               long timeoutMillis)
        +
        Parameters:
        name - name to give this thread
        queueSize - fixed size of queue
        timeoutMillis - default maximum time to wait for queue to have an available slot
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        execute

        +
        public void execute(java.lang.Runnable task)
        +             throws java.util.concurrent.RejectedExecutionException
        +
        Enqueue a task to run.
        +
        +
        Specified by:
        +
        execute in interface java.util.concurrent.Executor
        +
        Parameters:
        task - task to enqueue
        +
        Throws:
        +
        java.util.concurrent.RejectedExecutionException - if wait interrupted, timeout expires, + or shutdown has been called
        +
      • +
      + + + +
        +
      • +

        execute

        +
        public void execute(java.lang.Runnable task,
        +           long timeoutMillis)
        +             throws java.util.concurrent.RejectedExecutionException
        +
        Enqueue a task to run.
        +
        Parameters:
        task - task to enqueue
        timeoutMillis - maximum time to wait for queue to have an available slot
        +
        Throws:
        +
        java.util.concurrent.RejectedExecutionException - if wait interrupted, timeout expires, + or shutdown has been called
        +
      • +
      + + + +
        +
      • +

        shutdown

        +
        public void shutdown()
        +
        Indicate that this task queue thread should finish running its enqueued + tasks and then exit. Enqueueing new tasks will result in a + RejectedExecutionException being thrown. Join on this thread to wait for + it to exit.
        +
      • +
      + + + +
        +
      • +

        run

        +
        public void run()
        +
        +
        Specified by:
        +
        run in interface java.lang.Runnable
        +
        Overrides:
        +
        run in class java.lang.Thread
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + +
+ + +

Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.

+ + -- cgit v1.2.3