Package io.sentry
Class SentryExecutorService
java.lang.Object
io.sentry.SentryExecutorService
- All Implemented Interfaces:
ISentryExecutorService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose(long timeoutMillis) Closes the ThreadExecutor and awaits for the timeoutbooleanisClosed()Check if there was a previous call to the close() method.voidprewarm()Pre-warms the executor service by increasing the initial queue capacity.@NotNull Future<?>@NotNull Future<?>Submits a Runnable to the ThreadExecutor<T> @NotNull Future<T>Submits a Callable to the ThreadExecutor
-
Constructor Details
-
SentryExecutorService
-
SentryExecutorService
public SentryExecutorService()
-
-
Method Details
-
submit
@NotNull public @NotNull Future<?> submit(@NotNull @NotNull Runnable runnable) throws RejectedExecutionException Description copied from interface:ISentryExecutorServiceSubmits a Runnable to the ThreadExecutor- Specified by:
submitin interfaceISentryExecutorService- Parameters:
runnable- the Runnable- Returns:
- a Future of the Runnable
- Throws:
RejectedExecutionException
-
submit
@NotNull public <T> @NotNull Future<T> submit(@NotNull @NotNull Callable<T> callable) throws RejectedExecutionException Description copied from interface:ISentryExecutorServiceSubmits a Callable to the ThreadExecutor- Specified by:
submitin interfaceISentryExecutorService- Parameters:
callable- the Callable- Returns:
- a Future of the Callable
- Throws:
RejectedExecutionException
-
schedule
@NotNull public @NotNull Future<?> schedule(@NotNull @NotNull Runnable runnable, long delayMillis) throws RejectedExecutionException - Specified by:
schedulein interfaceISentryExecutorService- Throws:
RejectedExecutionException
-
close
public void close(long timeoutMillis) Description copied from interface:ISentryExecutorServiceCloses the ThreadExecutor and awaits for the timeout- Specified by:
closein interfaceISentryExecutorService- Parameters:
timeoutMillis- the timeout in millis
-
isClosed
public boolean isClosed()Description copied from interface:ISentryExecutorServiceCheck if there was a previous call to the close() method.- Specified by:
isClosedin interfaceISentryExecutorService- Returns:
- If the executorService was previously closed
-
prewarm
public void prewarm()Description copied from interface:ISentryExecutorServicePre-warms the executor service by increasing the initial queue capacity. SHOULD be called directly after instantiating this executor service.- Specified by:
prewarmin interfaceISentryExecutorService
-