org.edg.info
Class StreamingThread

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.edg.info.StreamingThread
All Implemented Interfaces:
java.lang.Runnable

public class StreamingThread
extends java.lang.Thread

Thread that periodically initiates streaming for a single producer.


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
StreamingThread(InsertableInstance streamingProducer)
          Creates a new StreamingThread for the given producer.
 
Method Summary
 void run()
          Main loop of thread.
 void streamChanged()
          Indicates to the thread that a new consumer has arrived or more tuples have been inserted (so streaming should be initiated).
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StreamingThread

public StreamingThread(InsertableInstance streamingProducer)
Creates a new StreamingThread for the given producer.

Parameters:
streamingProducer - Insertable producer.
Method Detail

streamChanged

public void streamChanged()
Indicates to the thread that a new consumer has arrived or more tuples have been inserted (so streaming should be initiated).


run

public void run()
Main loop of thread. Waits for 10 times STREAMING_PERIOD_MILLIS (or until streamChanged is true), then calls streamTuples on its streamingProducer.