private Set < MachineMetric > customMachineMetrics ( ) { Set < MachineMetric > customized = new HashSet < MachineMetric > ( ) ; for ( MetricType m : AwsSdkMetrics . getPredefinedMetrics ( ) ) { if ( m instanceof MachineMetric ) customized . add ( ( MachineMetric ) m ) ; } return customized ; }
Returns the set of custom machine metrics specified in the SDK metrics registry ; or an empty set if there is none . Note any machine metrics found in the registry must have been custom specified as the default behavior is to include all machine metrics when enabled .