public class IODispatcher
extends java.lang.Thread
Modifier and Type | Class and Description |
---|---|
private class |
IODispatcher.DumpJob<ReferenceType extends Reference> |
private class |
IODispatcher.MergeJob |
Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.Semaphore |
controlQueue |
private java.util.concurrent.ArrayBlockingQueue<IODispatcher.DumpJob<? extends Reference>> |
dumpQueue |
private static ConcurrentLog |
log |
private java.util.concurrent.ArrayBlockingQueue<IODispatcher.MergeJob> |
mergeQueue |
private boolean |
terminate |
private java.util.concurrent.Semaphore |
termination |
private int |
writeBufferSize |
Constructor and Description |
---|
IODispatcher(int dumpQueueLength,
int mergeQueueLength,
int writeBufferSize) |
Modifier and Type | Method and Description |
---|---|
protected void |
dump(ReferenceContainerCache<? extends Reference> cache,
java.io.File file,
ReferenceContainerArray<? extends Reference> array) |
protected void |
merge(java.io.File f1,
java.io.File f2,
ReferenceFactory<? extends Reference> factory,
ArrayStack array,
java.io.File newFile) |
protected int |
queueLength() |
void |
run() |
void |
terminate() |
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
private static final ConcurrentLog log
private java.util.concurrent.Semaphore controlQueue
private final java.util.concurrent.Semaphore termination
private java.util.concurrent.ArrayBlockingQueue<IODispatcher.MergeJob> mergeQueue
private java.util.concurrent.ArrayBlockingQueue<IODispatcher.DumpJob<? extends Reference>> dumpQueue
private boolean terminate
private final int writeBufferSize
public IODispatcher(int dumpQueueLength, int mergeQueueLength, int writeBufferSize)
public void terminate()
protected void dump(ReferenceContainerCache<? extends Reference> cache, java.io.File file, ReferenceContainerArray<? extends Reference> array)
protected int queueLength()
protected void merge(java.io.File f1, java.io.File f2, ReferenceFactory<? extends Reference> factory, ArrayStack array, java.io.File newFile)
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread