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
Modifier and Type
Class
Description
`static class`
`FederatedData.FederatedRequestEncoder`
`static class`
`FederatedData.GetPrivacyConstraints`

## Constructor Summary

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

## Method Summary

Modifier and Type
Method
Description
`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()`
`Future<FederatedResponse>`
`requestPrivacyConstraints()`
Requests privacy constraints from the federated worker
`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 Details

### FederatedData

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

### FederatedData

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

## Method Details

### 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`

### requestPrivacyConstraints

public Future<FederatedResponse> requestPrivacyConstraints()
Requests privacy constraints from the federated worker

Returns:
  Future containing the federated response with privacy constraints