Package io.sentry.util.thread
Class NoOpThreadChecker
java.lang.Object
io.sentry.util.thread.NoOpThreadChecker
- All Implemented Interfaces:
IThreadChecker
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the system id of the current thread.static NoOpThreadChecker
boolean
Checks if the calling/current thread is the Main/UI threadboolean
isMainThread
(long threadId) boolean
isMainThread
(@NotNull SentryThread sentryThread) Checks if a given thread is the Main/UI threadboolean
isMainThread
(@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:
isMainThread
in interfaceIThreadChecker
-
isMainThread
Description copied from interface:IThreadChecker
Checks if a given thread is the Main/UI thread- Specified by:
isMainThread
in interfaceIThreadChecker
- Parameters:
thread
- the Thread- Returns:
- true if it is the main thread or false otherwise
-
isMainThread
public boolean isMainThread()Description copied from interface:IThreadChecker
Checks if the calling/current thread is the Main/UI thread- Specified by:
isMainThread
in interfaceIThreadChecker
- Returns:
- true if it is the main thread or false otherwise
-
isMainThread
Description copied from interface:IThreadChecker
Checks if a given thread is the Main/UI thread- Specified by:
isMainThread
in interfaceIThreadChecker
- Parameters:
sentryThread
- the SentryThread- Returns:
- true if it is the main thread or false otherwise
-
currentThreadSystemId
public long currentThreadSystemId()Description copied from interface:IThreadChecker
Returns the system id of the current thread. Currently only used for Android.- Specified by:
currentThreadSystemId
in interfaceIThreadChecker
- Returns:
- the current thread system id.
-