Package de.hybris.platform.util
Class ThreadUtilities
java.lang.Object
de.hybris.platform.util.ThreadUtilities
utility methods for Thread handling
-
Method Summary
Modifier and TypeMethodDescriptionprotected static Setstatic intstatic intgetNumberOfThreadsFromExpression(String expression, int defaultValue) Evaluates an expression and returns its value.static intget the number of threads, not limited by thread group or activitystatic Mapstatic Stringstatic void
-
Method Details
-
getAllThreads
-
getThreadCount
public static int getThreadCount()get the number of threads, not limited by thread group or activity -
getThreadCountMap
-
printThreadDump
-
printThreadDump
-
getNumberOfThreadsFromExpression
Evaluates an expression and returns its value. If expression can't be evaluated a given default value will be returned. In expression you can use#coresvariable which holds number of cores. In case when expression evaluates to value lower than 1 value 1 will be returned. Examples of valid expressions:7#cores#cores * 2#cores - 1
- Parameters:
expression- expression to evaluatedefaultValue- default value which must be greater than zero- Returns:
- value of expression or default value
-
getNumberOfAvailableCores
public static int getNumberOfAvailableCores()
-