org.pentaho.di.www
Class TransformationMap

java.lang.Object
  extended by org.pentaho.di.www.TransformationMap

public class TransformationMap
extends Object

This is a map between the transformation name and the (running/waiting/finished) transformation.

Author:
Matt

Constructor Summary
TransformationMap()
           
TransformationMap(String parentThreadName)
          Deprecated. The parent thread name is no longer used.
 
Method Summary
 void addAppender(String transformationName, org.apache.log4j.Appender appender)
           
 void addTransformation(String transformationName, Trans trans, TransConfiguration transConfiguration)
           
 SocketPortAllocation allocateServerSocketPort(int portRangeStart, String hostname, String transformationName, String sourceSlaveName, String sourceStepName, String sourceStepCopy, String targetSlaveName, String targetStepName, String targetStepCopy)
          This is the meat of the whole problem.
 void deallocateServerSocketPort(int port, String hostname)
           
 void deallocateServerSocketPorts(String transName)
          Deallocate all the ports for the given transformation name, accross all hosts.
 org.apache.log4j.Appender getAppender(String transformationName)
           
 TransConfiguration getConfiguration(String transformationName)
           
 Map<String,TransConfiguration> getConfigurationMap()
           
 Trans getTransformation(String transformationName)
           
 String[] getTransformationNames()
           
 void removeAppender(String transformationName)
           
 void removeTransformation(String transformationName)
           
 void setConfigurationMap(Map<String,TransConfiguration> configurationMap)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformationMap

public TransformationMap(String parentThreadName)
Deprecated. The parent thread name is no longer used.

Parameters:
parentThreadName -

TransformationMap

public TransformationMap()
Method Detail

addTransformation

public void addTransformation(String transformationName,
                              Trans trans,
                              TransConfiguration transConfiguration)

getTransformation

public Trans getTransformation(String transformationName)

getConfiguration

public TransConfiguration getConfiguration(String transformationName)

removeTransformation

public void removeTransformation(String transformationName)

getAppender

public org.apache.log4j.Appender getAppender(String transformationName)

addAppender

public void addAppender(String transformationName,
                        org.apache.log4j.Appender appender)

removeAppender

public void removeAppender(String transformationName)

getTransformationNames

public String[] getTransformationNames()

getConfigurationMap

public Map<String,TransConfiguration> getConfigurationMap()
Returns:
the configurationMap

setConfigurationMap

public void setConfigurationMap(Map<String,TransConfiguration> configurationMap)
Parameters:
configurationMap - the configurationMap to set

allocateServerSocketPort

public SocketPortAllocation allocateServerSocketPort(int portRangeStart,
                                                     String hostname,
                                                     String transformationName,
                                                     String sourceSlaveName,
                                                     String sourceStepName,
                                                     String sourceStepCopy,
                                                     String targetSlaveName,
                                                     String targetStepName,
                                                     String targetStepCopy)
This is the meat of the whole problem. We'll allocate a port for a given slave, transformation and step copy, always on the same host. Algorithm: 1) Search for the right map in the hostPortMap

Parameters:
portRangeStart - the start of the port range as described in the used cluster schema
hostname - the hostname to allocate this address for
transformationName -
sourceStepName -
sourceStepCopy -
Returns:

deallocateServerSocketPorts

public void deallocateServerSocketPorts(String transName)
Deallocate all the ports for the given transformation name, accross all hosts.

Parameters:
transName - the transformation name to release

deallocateServerSocketPort

public void deallocateServerSocketPort(int port,
                                       String hostname)