|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
com.mucommander.ui.main.tree.AbstractIOThreadManager
public class AbstractIOThreadManager
A class that monitors IOThread if it is running or has been blocked. This class maintains a list of tasks to execute and a thread that executes these tasks. It checks periodically if the IOThread is running. If IOThread has been blocked then it's killed and a new IOThread is instantiated. Then the next task from the list will be executed.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
protected long |
blockThreshold
a time after i/o thread is marked as blocked |
protected IOThread |
ioThread
a thread that executes tasks |
protected java.util.List |
queue
a queue with tasks to execute |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
AbstractIOThreadManager(java.lang.String name,
long blockThreshold)
Creates a new monitoring thread. |
|
| Method Summary | |
|---|---|
void |
addTask(java.lang.Runnable task)
Adds new task to execute. |
void |
run()
|
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, 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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final java.util.List queue
protected IOThread ioThread
protected long blockThreshold
| Constructor Detail |
|---|
public AbstractIOThreadManager(java.lang.String name,
long blockThreshold)
name - a name of this threadblockThreshold - a time after an i/o task is marked as blocked [ms]| Method Detail |
|---|
public void addTask(java.lang.Runnable task)
task - a task to be executedpublic void run()
run in interface java.lang.Runnablerun in class java.lang.Thread
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard