com.threerings.miso.client
Class SceneBlockResolver

java.lang.Object
  extended by java.lang.Thread
      extended by com.samskivert.util.LoopingThread
          extended by com.threerings.miso.client.SceneBlockResolver
All Implemented Interfaces:
Runnable

public class SceneBlockResolver
extends LoopingThread

A separate thread for resolving miso scene blocks.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
protected  Histogram _histo
          Used to time block loading.
protected  Queue<SceneBlock> _queue
          The invoker's queue of units to be executed.
protected  boolean _resolving
          Indicates whether or not we are resolving or suspended.
protected static long LONG_RESOLVE_TIME
          Blocks shouldn't take too long to resolve.
 
Fields inherited from class com.samskivert.util.LoopingThread
_running
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SceneBlockResolver()
           
 
Method Summary
 void iterate()
           
 int queueSize()
          Returns the number of scene blocks on the resolution queue.
 void resolveBlock(SceneBlock block, boolean hipri)
          Queues up a scene block for resolution.
 void restoreResolution()
          Restores the operation of the scene block resolution thread after a previous call to suspendResolution().
 void suspendResolution()
          Temporarily suspends the scene block resolution thread.
 
Methods inherited from class com.samskivert.util.LoopingThread
didShutdown, handleIterateFailure, isRunning, kick, run, shutdown, willStart
 
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

_queue

protected Queue<SceneBlock> _queue
The invoker's queue of units to be executed.


_resolving

protected boolean _resolving
Indicates whether or not we are resolving or suspended.


_histo

protected Histogram _histo
Used to time block loading.


LONG_RESOLVE_TIME

protected static final long LONG_RESOLVE_TIME
Blocks shouldn't take too long to resolve.

See Also:
Constant Field Values
Constructor Detail

SceneBlockResolver

public SceneBlockResolver()
Method Detail

resolveBlock

public void resolveBlock(SceneBlock block,
                         boolean hipri)
Queues up a scene block for resolution.


suspendResolution

public void suspendResolution()
Temporarily suspends the scene block resolution thread.


restoreResolution

public void restoreResolution()
Restores the operation of the scene block resolution thread after a previous call to suspendResolution().


queueSize

public int queueSize()
Returns the number of scene blocks on the resolution queue.


iterate

public void iterate()
Overrides:
iterate in class LoopingThread