org.hsqldb.lib
Class HsqlTaskQueue
java.lang.Object
org.hsqldb.lib.HsqlTaskQueue
- public class HsqlTaskQueue
- extends Object
Provides very simple queued execution of Runnable objects in a background
thread. The underlying queue is an HsqlDeque instance, an array-based
circular queue implementation with automatic capacity expansion.
- Since:
- 1.7.2
- Version:
- 1.7.2
- Author:
- boucherb@users.sourceforge.net
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
taskRunnerThread
protected Thread taskRunnerThread
- The thread used to process commands
SHUTDOWNTASK
protected static Runnable SHUTDOWNTASK
- Special queue element to signal termination
isShutdown
protected volatile boolean isShutdown
- true if thread should shut down after processing current task.
Once set true, stays true forever
queue
protected final HsqlDeque queue
taskRunner
protected final HsqlTaskQueue.TaskRunner taskRunner
HsqlTaskQueue
public HsqlTaskQueue()
getTaskRunnerThread
public Thread getTaskRunnerThread()
clearThread
protected void clearThread()
isShutdown
public boolean isShutdown()
restart
public void restart()
execute
public void execute(Runnable command)
throws RuntimeException
- Throws:
RuntimeException
shutdownAfterQueued
public void shutdownAfterQueued()
shutdownAfterCurrent
public void shutdownAfterCurrent()
shutdownImmediately
public void shutdownImmediately()
Copyright © 2001 - 2004 HSQL Development Group. All Rights Reserved.