- All Implemented Interfaces:
- java.lang.AutoCloseable, java.lang.Runnable
public class Slave
extends java.lang.Object
implements java.lang.Runnable, java.lang.AutoCloseable
The slave, which in fact is a InstanceFactory, will new a spout or bolt according to the PhysicalPlan.
First, if the instance is null, it will wait for the PhysicalPlan from inQueue and, if it receives one,
we will instantiate a new instance (spout or bolt) according to the PhysicalPlanHelper in SingletonRegistry.
It is a Runnable so it could be executed in a Thread. During run(), it will begin the SlaveLooper's loop().