Class VisorTaskUtils


  • public class VisorTaskUtils
    extends Object
    Contains utility methods for Visor tasks and jobs.
    • Constructor Detail

      • VisorTaskUtils

        public VisorTaskUtils()
    • Method Detail

      • compactClass

        @Nullable
        public static @Nullable String compactClass​(Class cls)
        Compact class names.
        Parameters:
        cls - Class object for compact.
        Returns:
        Compacted string.
      • compactClass

        @Nullable
        public static @Nullable String compactClass​(@Nullable
                                                    @Nullable Object obj)
        Compact class names.
        Parameters:
        obj - Object for compact.
        Returns:
        Compacted string.
      • compactClasses

        @Nullable
        public static @Nullable List<String> compactClasses​(Class<?>[] clss)
        Compact classes names.
        Parameters:
        clss - Classes to compact.
        Returns:
        Compacted string.
      • compactIterable

        @Nullable
        public static @Nullable String compactIterable​(Iterable col)
        Joins iterable collection elements to string.
        Parameters:
        col - Iterable collection.
        Returns:
        String.
      • evictionPolicyMaxSize

        public static Integer evictionPolicyMaxSize​(@Nullable
                                                    @Nullable javax.cache.configuration.Factory plc)
        Extract max size from eviction policy if available.
        Parameters:
        plc - Eviction policy.
        Returns:
        Extracted max size.
      • logStart

        public static void logStart​(@Nullable
                                    @Nullable IgniteLogger log,
                                    Class<?> clazz,
                                    long start)
        Log start.
        Parameters:
        log - Logger.
        clazz - Class.
        start - Start time.
      • logFinish

        public static void logFinish​(@Nullable
                                     @Nullable IgniteLogger log,
                                     Class<?> clazz,
                                     long start)
        Log finished.
        Parameters:
        log - Logger.
        clazz - Class.
        start - Start time.
      • logMapped

        public static void logMapped​(@Nullable
                                     @Nullable IgniteLogger log,
                                     Class<?> clazz,
                                     Collection<ClusterNode> nodes)
        Log task mapped.
        Parameters:
        log - Logger.
        clazz - Task class.
        nodes - Mapped nodes.
      • log

        public static long log​(@Nullable
                               @Nullable IgniteLogger log,
                               String msg,
                               Class<?> clazz,
                               long start)
        Log message.
        Parameters:
        log - Logger.
        msg - Message to log.
        clazz - class.
        start - start time.
        Returns:
        Time when message was logged.
      • isRestartingCache

        public static boolean isRestartingCache​(IgniteEx ignite,
                                                String cacheName)
        Check whether cache restarting in progress.
        Parameters:
        ignite - Grid.
        cacheName - Cache name to check.
        Returns:
        true when cache restarting in progress.