Class ProcessorNode

java.lang.Object
com.nt.udc.ndk.node.DCNode
com.nt.udc.ndk.node.ProcessorNode
All Implemented Interfaces:
AdminIfc, ConfigIfc, LoggerIfc, NodeHealthIfc, NodeStateManagementIfc, PropertyIfc, StateManagementIfc
Direct Known Subclasses:
CommonProcessorNode

public abstract class ProcessorNode extends DCNode
  • Field Details

    • fieldProcessor

      protected DCFieldProcessor fieldProcessor
      The DCFieldProcessor class in this ProcessorNode is where all the real work occurs.
    • fp

      protected DCFieldProcessor[] fp
    • fpThread

      protected Thread fpThread
      If using a thread field processor, this is where it should run.
  • Constructor Details

    • ProcessorNode

      public ProcessorNode()
      Default Constructor; instantiates objects necessary to define the DCNodeTypeIfc methods.
    • ProcessorNode

      public ProcessorNode(String[] args) throws NodeStartException
      Constructor for the class. Calls the super class DCNode then sets up directory space for input and output in:   invalid input: '&nbsp' /input
        invalid input: '&nbsp' /output
      Subclasses should then instantiate the DCFieldProcessor object as both a DataReceiverIfc and a DataProviderIfc. Then the DCFieldProcessor should have it's provider and receiver set as appropriate.
      Parameters:
      args - Passed to super class DCNode
      Throws:
      NodeStartException
    • ProcessorNode

      public ProcessorNode(String[] args, boolean multithread) throws NodeStartException
      Constructor for the class. Calls the super class DCNode then sets up directory space for input and output in:   invalid input: '&nbsp' /input
        invalid input: '&nbsp' /output
      Subclasses should then instantiate the DCFieldProcessor object as both a DataReceiverIfc and a DataProviderIfc. Then the DCFieldProcessor should have it's provider and receiver set as appropriate. This constructor is called from derived class if it supports multi-threading
      Parameters:
      args - Passed to super class DCNode
      multithread - Passed from derived class if it supports multi-threading
      Throws:
      NodeStartException
  • Method Details

    • getMajorType

      public final String getMajorType()
      Specified by:
      getMajorType in class DCNode
      Returns:
      Returns the 'Major Type' of this node.
    • setFieldProcessor

      protected void setFieldProcessor(DCFieldProcessor fp)
      Sets the DCFieldProcessor for this node.
      Parameters:
      fp - The DCFieldProcessor object to be used within this node.
    • setFieldProcessor

      protected void setFieldProcessor(DCFieldProcessor fp, int i)
      Sets the DCFieldProcessor for this node for i th thread
    • getFieldProcessor

      protected DCFieldProcessor getFieldProcessor()
      Gets the object that is responsible for processing the raw data into the format being passed out of the node (most likely NARs).
      Returns:
      Returns the DCFieldProcessor object for this node.
    • getFieldProcessor

      protected DCFieldProcessor getFieldProcessor(int i)
    • setFieldProcessorThread

      public void setFieldProcessorThread(DCFieldProcessor fp)
      Sets the DCFieldProcessor to run within its own thread.
      Parameters:
      fp - A runnable DCFieldProcessor object.
    • setFieldProcessorThread

      public void setFieldProcessorThread(DCFieldProcessor fp, int i, String name)
      Sets the DCFieldProcessor to run within its own thread.
      Parameters:
      fp - A runnable DCFieldProcessor object.
      i - Index of a runnable DCFieldProcessor object.
      name - Name of runnable DCFieldProcessor object.
    • getFieldProcessorThread

      public Thread getFieldProcessorThread()
      Returns:
      Returns the thread which is executing the DCFieldProcessor.
    • getFieldProcessorThread

      public Thread getFieldProcessorThread(int i)
      Returns the thread in which the i th FieldProcessor is running.
      Parameters:
      i - Index of a runnable DCFieldProcessor object.
      Returns:
      Returns DCFieldProcessor's thread.
    • isNodeStateUsed

      public boolean isNodeStateUsed()
      Returns whether the node state is used (and whether the node can be recovered. Currently disabled for NPLProcessorNode.
      Specified by:
      isNodeStateUsed in interface NodeStateManagementIfc
      Overrides:
      isNodeStateUsed in class DCNode
      Returns:
      true, if node state is being used
    • initDCStreamHandler

      protected void initDCStreamHandler(int numThreads, boolean isMultithreaded, boolean isOrdered)
      Sets the DCStreamHandler for each thread
      Parameters:
      numThreads -
      isMultithreaded -
      isOrdered -