Package io.sentry.util.thread
Class NoOpThreadChecker
java.lang.Object
io.sentry.util.thread.NoOpThreadChecker
- All Implemented Interfaces:
IThreadChecker
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the system id of the current thread.@NotNull StringReturns the name of the current threadstatic NoOpThreadCheckerbooleanChecks if the calling/current thread is the Main/UI threadbooleanisMainThread(long threadId) booleanisMainThread(@NotNull SentryThread sentryThread) Checks if a given thread is the Main/UI threadbooleanisMainThread(@NotNull Thread thread) Checks if a given thread is the Main/UI thread
-
Constructor Details
-
NoOpThreadChecker
public NoOpThreadChecker()
-
-
Method Details
-
getInstance
-
isMainThread
public boolean isMainThread(long threadId) - Specified by:
isMainThreadin interfaceIThreadChecker
-
isMainThread
Description copied from interface:IThreadCheckerChecks if a given thread is the Main/UI thread- Specified by:
isMainThreadin interfaceIThreadChecker- Parameters:
thread- the Thread- Returns:
- true if it is the main thread or false otherwise
-
isMainThread
public boolean isMainThread()Description copied from interface:IThreadCheckerChecks if the calling/current thread is the Main/UI thread- Specified by:
isMainThreadin interfaceIThreadChecker- Returns:
- true if it is the main thread or false otherwise
-
isMainThread
Description copied from interface:IThreadCheckerChecks if a given thread is the Main/UI thread- Specified by:
isMainThreadin interfaceIThreadChecker- Parameters:
sentryThread- the SentryThread- Returns:
- true if it is the main thread or false otherwise
-
getCurrentThreadName
Description copied from interface:IThreadCheckerReturns the name of the current thread- Specified by:
getCurrentThreadNamein interfaceIThreadChecker- Returns:
- the name of the current thread
-
currentThreadSystemId
public long currentThreadSystemId()Description copied from interface:IThreadCheckerReturns the system id of the current thread. Currently only used for Android.- Specified by:
currentThreadSystemIdin interfaceIThreadChecker- Returns:
- the current thread system id.
-