Class TaskWorkStateUtil


  • public class TaskWorkStateUtil
    extends Object
    Utility methods related to task work state and work state management.
    • Constructor Detail

      • TaskWorkStateUtil

        public TaskWorkStateUtil()
    • Method Detail

      • sortBucketsBySequentialNumber

        public static void sortBucketsBySequentialNumber​(List<WorkBucketType> buckets)
      • getCompleteBucketsNumber

        public static int getCompleteBucketsNumber​(TaskType taskType)
      • getCompleteBucketsNumber

        public static int getCompleteBucketsNumber​(TaskWorkStateType workState)
      • getExpectedBuckets

        @Nullable
        public static @Nullable Integer getExpectedBuckets​(TaskType task)
      • hasLimitations

        public static boolean hasLimitations​(WorkBucketType bucket)
      • getPartitionSequentialNumber

        @Nullable
        public static @Nullable Integer getPartitionSequentialNumber​(@NotNull
                                                                     @NotNull TaskType taskType)
      • isCoordinator

        public static boolean isCoordinator​(TaskType task)
        Returns:
        True if the task is a coordinator (in the bucketing sense).
      • isPartitionedMaster

        public static boolean isPartitionedMaster​(TaskType task)
        Returns:
        True if the task is a partitioned master.
      • getKind

        @NotNull
        public static @NotNull TaskKindType getKind​(TaskType task)
        Returns:
        Task kind: standalone, coordinator, worker, partitioned master.
      • isManageableTreeRoot

        public static boolean isManageableTreeRoot​(TaskType taskType)
      • isWorkStateHolder

        public static boolean isWorkStateHolder​(TaskType taskType)
      • isAllWorkComplete

        public static boolean isAllWorkComplete​(TaskType task)