org.apache.sysds.runtime.controlprogram.federated

## Class FederatedUDF

- java.lang.Object
- - org.apache.sysds.runtime.controlprogram.federated.FederatedUDF

- All Implemented Interfaces:
    Serializable, LineageTraceable
  Direct Known Subclasses:
    MultiReturnParameterizedBuiltinFEDInstruction.CreateFrameEncoder, MultiReturnParameterizedBuiltinFEDInstruction.ExecuteFrameEncoder, ParameterizedBuiltinFEDInstruction.DecodeMatrix, ReorgFEDInstruction.DiagMatrix, ReorgFEDInstruction.Rdiag

      public abstract class FederatedUDF
      extends Object
      implements Serializable, LineageTraceable

  See Also:
    Serialized Form

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract FederatedResponse` | `execute(ExecutionContext ec, Data... data)` Execute the user-defined function on a set of data objects (e.g., matrix objects, frame objects, or scalars), which are looked up by specified input IDs and passed in the same order.
    `long[]` | `getInputIDs()`
    `List<Long>` | `getOutputIds()`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.sysds.runtime.lineage.LineageTraceable

      `getLineageItem, getLineageItems, hasSingleLineage`

- - ### Method Detail

    - #### getInputIDs

          public final long[] getInputIDs()

    - #### getOutputIds

          public List<Long> getOutputIds()

    - #### execute

          public abstract FederatedResponse execute(ExecutionContext ec,
                                                    Data... data)

      Execute the user-defined function on a set of data objects (e.g., matrix objects, frame objects, or scalars), which are looked up by specified input IDs and passed in the same order. Output data objects (potentially many) can be directly added to the passed execution context and its variable map.
      Parameters:
        `ec` - execution context
        `data` - one or many data objects
      Returns:
        federated response, with none or many output objects

Copyright © 2021 The Apache Software Foundation. All rights reserved.