TransferFunctionSetting

org.eso.ias.asce.transfer.TransferFunctionSetting
See theTransferFunctionSetting companion object
class TransferFunctionSetting(val className: String, val language: Value, templateInstance: Option[Int], threadFactory: ThreadFactory)

The settings for the transfer function are retrieved from the configuration (DB, XML, text file) and passed to the ComputingElement.

Objects of this class contain all the information to run the transfer function independently from the supported programming language (@see TransferFunctionLanguage).

At the present there 3 possible implementations of the transfer function in scala, java or python.

Java implementation requires to provide a java-style interface to developers for which we need to convert scala data structure to/from java. Scala implementations of the TF are therefore more performant (in principle).

For python TFs, we use jep (https://github.com/ninia/jep) that provides interoperability between java and python. For the python TFs, a java class is always loaded, PythonExecutorTF, that delegates to the python class whose name is in the className property

Value parameters

className:

The name of the java/scala/python class to run

language:

the programming language used to implement the TF

templateInstance:

the instance of the template if defined; if empty the ASCE is not generated out of a template

threadFactory:

The thread factory to async. run init and shutdown on the user provided TF object

Attributes

See also

ComputingElement

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def initialize(asceId: String, asceRunningId: String, validityTimeFrame: Long, props: Properties): Boolean

Load and build the executor of the transfer function.

Load and build the executor of the transfer function.

This can be slow and access remote resources so it must be run in a worker thread

Value parameters

asceId:

the ID of the ASCE

asceRunningId:

the runningID of the ASCE

props:

the user defined properties

validityTimeFrame:

The time frame (msec) to invalidate monitor points

Attributes

Returns

true if the initialization went fine false otherwise

def shutdown(): Unit

Shuts the TF down

Shuts the TF down

Attributes

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any

Concrete fields

val className: String
var initialized: Boolean

Initialized is true when the object to run the TF has been loaded and initialized

Initialized is true when the object to run the TF has been loaded and initialized

Attributes

var isShutDown: Boolean

isShutDown is true when the object has been shutdown

isShutDown is true when the object has been shutdown

Attributes

val nameOfClassToLoad: String

The name of the java/scala class to load

The name of the java/scala class to load

This is needed because the name of the java class for running python TF is not passed in the constructor but is needed at least for meaningful log messages

Attributes

var transferExecutor: Option[TransferExecutor]

The java or scala transfer executor i.e. the java or scala object that implements the transfer function

The java or scala transfer executor i.e. the java or scala object that implements the transfer function

Attributes