Package jetbrains.buildServer.util
Class NamedThreadUtil
- java.lang.Object
-
- jetbrains.buildServer.util.NamedThreadUtil
-
public class NamedThreadUtil extends Object
Created 19.11.12 17:35- Since:
- TC 8.0
- Author:
- Eugene Petrenko (eugene.petrenko@jetbrains.com)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNamedThreadUtil.PerfStatstatic classNamedThreadUtil.ThreadNameCookie
-
Constructor Summary
Constructors Constructor Description NamedThreadUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static NamedThreadUtil.PerfStatgetCurrentStats(Thread thread, boolean updateCachedThreadStat)static StringgetTcThreadPrefix()static long[]getThreadStatistics(Thread thread)static NamedThreadUtil.ThreadNameCookieupdateThreadName(String newDetails)Updates current thread name to include new detailsstatic DisposableupdateThreadName(String newDetails, boolean rememberThreadStatistics)Deprecated.rememberThreadStatistics is no longer used herestatic voidupdateThreadStatistics()
-
-
-
Method Detail
-
updateThreadName
@NotNull public static NamedThreadUtil.ThreadNameCookie updateThreadName(@NotNull String newDetails)
Updates current thread name to include new details- Parameters:
newDetails- new thread name- Returns:
- cookie to revert thread name change
- Since:
- TC 8.0
-
updateThreadName
@NotNull public static Disposable updateThreadName(@NotNull String newDetails, boolean rememberThreadStatistics)
Deprecated.rememberThreadStatistics is no longer used hereUpdates current thread name to include new details, also remembers additional thread related statistics if possible (allocated memory on the moment of method call).- Parameters:
newDetails- new thread name- Returns:
- disposable object to revert thread name change
- Since:
- TC 8.1
-
getTcThreadPrefix
public static String getTcThreadPrefix()
- Returns:
- Thread name debug prefix with timestamp
- Since:
- 8.0.5
-
getThreadStatistics
@Nullable public static long[] getThreadStatistics(@NotNull Thread thread)
-
getCurrentStats
@Nullable public static NamedThreadUtil.PerfStat getCurrentStats(@NotNull Thread thread, boolean updateCachedThreadStat)
-
updateThreadStatistics
public static void updateThreadStatistics()
-
-