Package org.apache.sysds.runtime.controlprogram.federated

## Class FederatedData

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

Direct Known Subclasses:
  `FederatedLocalData`

    public class FederatedData
    extends Object

### Nested Class Summary

Nested Classes
`static class` `FederatedData.FederatedRequestEncoder`

### Constructor Summary

Constructors
`FederatedData​(Types.DataType dataType, InetSocketAddress address, String filepath)`
`FederatedData​(Types.DataType dataType, InetSocketAddress address, String filepath, long varID)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static void` `clearFederatedWorkers()`
`static void` `clearWorkGroup()`
`FederatedData` `copyWithNewID​(long varID)` Make a copy of the `FederatedData` metadata, but use another varID (refer to another object on worker)
`static void` `createWorkGroup()`
`static Future<FederatedResponse>` `executeFederatedOperation​(InetSocketAddress address, int retry, FederatedRequest... request)` Executes an federated operation on a federated worker.
`static Future<FederatedResponse>` `executeFederatedOperation​(InetSocketAddress address, FederatedRequest... request)` Executes an federated operation on a federated worker.
`Future<FederatedResponse>` `executeFederatedOperation​(FederatedRequest... request)`
`InetSocketAddress` `getAddress()`
`Types.DataType` `getDataType()`
`String` `getFilepath()`
`long` `getVarID()`
`Future<FederatedResponse>` `initFederatedData​(long id)`
`Future<FederatedResponse>` `initFederatedData​(long id, MetaData mtd)`
`Future<FederatedResponse>` `initFederatedDataFromLocal​(long id, CacheBlock<?> block)`
`boolean` `isInitialized()`
`static void` `resetFederatedSites()`
`void` `setVarID​(long varID)`
`String` `toString()`

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

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

### Constructor Detail

#### FederatedData

    public FederatedData​(Types.DataType dataType,
                         InetSocketAddress address,
                         String filepath)

#### FederatedData

    public FederatedData​(Types.DataType dataType,
                         InetSocketAddress address,
                         String filepath,
                         long varID)

### Method Detail

#### getAddress

    public InetSocketAddress getAddress()

#### setVarID

    public void setVarID​(long varID)

#### getVarID

    public long getVarID()

#### getFilepath

    public String getFilepath()

#### getDataType

    public Types.DataType getDataType()

#### isInitialized

    public boolean isInitialized()

#### copyWithNewID

    public FederatedData copyWithNewID​(long varID)

Make a copy of the `FederatedData` metadata, but use another varID (refer to another object on worker)

Parameters:
  `varID` - the varID of the variable we refer to
Returns:
  new `FederatedData` with different varID set

#### initFederatedData

    public Future<FederatedResponse> initFederatedData​(long id)

#### initFederatedData

    public Future<FederatedResponse> initFederatedData​(long id,
                                                       MetaData mtd)

#### initFederatedDataFromLocal

    public Future<FederatedResponse> initFederatedDataFromLocal​(long id,
                                                                CacheBlock<?> block)

#### executeFederatedOperation

    public Future<FederatedResponse> executeFederatedOperation​(FederatedRequest... request)

#### executeFederatedOperation

    public static Future<FederatedResponse> executeFederatedOperation​(InetSocketAddress address,
                                                                      FederatedRequest... request)

Executes an federated operation on a federated worker.

Parameters:
  `address` - socket address (incl host and port)
  `request` - the requested operation
Returns:
  the response

#### executeFederatedOperation

    public static Future<FederatedResponse> executeFederatedOperation​(InetSocketAddress address,
                                                                      int retry,
                                                                      FederatedRequest... request)

Executes an federated operation on a federated worker.

Parameters:
  `address` - socket address (incl host and port)
  `retry` - the retry count
  `request` - the requested operation
Returns:
  the response

#### clearFederatedWorkers

    public static void clearFederatedWorkers()

#### resetFederatedSites

    public static void resetFederatedSites()

#### clearWorkGroup

    public static void clearWorkGroup()

#### createWorkGroup

    public static void createWorkGroup()

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`