Package org.apache.sysds.hops.fedplanner

## Class PrivacyConstraintLoaderMock

- java.lang.Object
- - org.apache.sysds.hops.fedplanner.PrivacyConstraintLoader
  - - org.apache.sysds.hops.fedplanner.PrivacyConstraintLoaderMock

    public class PrivacyConstraintLoaderMock
    extends PrivacyConstraintLoader

This class is a mockup of the PrivacyConstraintLoader which replaces the call to loadFederatedPrivacyConstraints. This means that instead of loading the privacy constraints from the federated workers, the constraint returned for each federated DataOp will have the privacy level specified in the constructor, without sending any federated requests.

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.sysds.hops.fedplanner.PrivacyConstraintLoader

`PrivacyConstraintLoader.PrivacyConstraintRetriever`

### Constructor Summary

Constructors
`PrivacyConstraintLoaderMock​(String mockLevel)` Creates a mock of PrivacyConstraintLoader where the given privacy level is given to all federated data.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `loadFederatedPrivacyConstraints​(Hop hop)` Set privacy constraint of given hop to mocked privacy level.

### Methods inherited from class org.apache.sysds.hops.fedplanner.PrivacyConstraintLoader

`loadConstraints`

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

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

### Constructor Detail

#### PrivacyConstraintLoaderMock

    public PrivacyConstraintLoaderMock​(String mockLevel)

Creates a mock of PrivacyConstraintLoader where the given privacy level is given to all federated data.

Parameters:
  `mockLevel` - string representing the privacy level used for the setting of privacy constraints

### Method Detail

#### loadFederatedPrivacyConstraints

    public void loadFederatedPrivacyConstraints​(Hop hop)

Set privacy constraint of given hop to mocked privacy level. This mocks the behavior of the privacy constraint loader by setting the privacy constraint to a specific level for all federated data objects instead of retrieving the privacy constraints from the workers.

Overrides:
  `loadFederatedPrivacyConstraints` in class `PrivacyConstraintLoader`
Parameters:
  `hop` - for which privacy constraint is set