Package org.apache.sysds.runtime.privacy
Class PrivacyMonitor
- java.lang.Object
-
- org.apache.sysds.runtime.privacy.PrivacyMonitor
-
public class PrivacyMonitor extends Object
-
-
Constructor Summary
Constructors Constructor Description PrivacyMonitor()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
clearCheckedConstraints()
Clears all checked constraints.static EnumMap<PrivacyConstraint.PrivacyLevel,LongAdder>
getCheckedConstraints()
static Data
handlePrivacy(Data dataObject)
Throws DMLPrivacyException if privacy constraint is set to private or private aggregation.static void
setCheckPrivacy(boolean checkPrivacyParam)
-
-
-
Method Detail
-
getCheckedConstraints
public static EnumMap<PrivacyConstraint.PrivacyLevel,LongAdder> getCheckedConstraints()
-
clearCheckedConstraints
public static void clearCheckedConstraints()
Clears all checked constraints. This is used to reset the counter of checked constraints for each PrivacyLevel.
-
setCheckPrivacy
public static void setCheckPrivacy(boolean checkPrivacyParam)
-
handlePrivacy
public static Data handlePrivacy(Data dataObject)
Throws DMLPrivacyException if privacy constraint is set to private or private aggregation. The checked constraints log will be updated before throwing an exception.- Parameters:
dataObject
- input data object- Returns:
- data object or data object with privacy constraint removed in case the privacy level was none.
-
-