Class VisorTaskUtils
- java.lang.Object
-
- org.apache.ignite.internal.visor.util.VisorTaskUtils
-
public class VisorTaskUtils extends Object
Contains utility methods for Visor tasks and jobs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVisorTaskUtils.SortableAddressSpecial wrapper over address that can be sorted in following order: IPv4, private IPv4, IPv4 local host, IPv6.
-
Constructor Summary
Constructors Constructor Description VisorTaskUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @Nullable StringcompactClass(@Nullable Object obj)Compact class names.static @Nullable StringcompactClass(Class cls)Compact class names.static @Nullable List<String>compactClasses(Class<?>[] clss)Compact classes names.static @Nullable StringcompactIterable(Iterable col)Joins iterable collection elements to string.static IntegerevictionPolicyMaxSize(@Nullable javax.cache.configuration.Factory plc)Extract max size from eviction policy if available.static booleanisRestartingCache(IgniteEx ignite, String cacheName)Check whether cache restarting in progress.static longlog(@Nullable IgniteLogger log, String msg, Class<?> clazz, long start)Log message.static voidlogFinish(@Nullable IgniteLogger log, Class<?> clazz, long start)Log finished.static voidlogMapped(@Nullable IgniteLogger log, Class<?> clazz, Collection<ClusterNode> nodes)Log task mapped.static voidlogStart(@Nullable IgniteLogger log, Class<?> clazz, long start)Log start.
-
-
-
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.
-
-