Class DefaultLoadingWeight
- java.lang.Object
-
- org.apache.flink.runtime.scheduler.loading.DefaultLoadingWeight
-
- All Implemented Interfaces:
Serializable,Comparable<LoadingWeight>,LoadingWeight
@Internal public class DefaultLoadingWeight extends Object implements LoadingWeight
The default implementation ofLoadingWeight.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static LoadingWeightEMPTY
-
Constructor Summary
Constructors Constructor Description DefaultLoadingWeight(float loading)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(LoadingWeight o)booleanequals(Object o)floatgetLoading()Get the loading value.inthashCode()LoadingWeightmerge(LoadingWeight other)Merge the other loading weight and this one into a new object.StringtoString()
-
-
-
Field Detail
-
EMPTY
public static final LoadingWeight EMPTY
-
-
Method Detail
-
getLoading
public float getLoading()
Description copied from interface:LoadingWeightGet the loading value.- Specified by:
getLoadingin interfaceLoadingWeight- Returns:
- A float represented the loading.
-
merge
public LoadingWeight merge(LoadingWeight other)
Description copied from interface:LoadingWeightMerge the other loading weight and this one into a new object.- Specified by:
mergein interfaceLoadingWeight- Parameters:
other- A loading weight object.- Returns:
- The new merged
LoadingWeight.
-
compareTo
public int compareTo(@Nonnull LoadingWeight o)- Specified by:
compareToin interfaceComparable<LoadingWeight>
-
-