@@ -54,7 +54,8 @@ public SentryExecutorService() {
5454 }
5555
5656 @ Override
57- public @ NotNull Future <?> submit (final @ NotNull Runnable runnable ) throws RejectedExecutionException {
57+ public @ NotNull Future <?> submit (final @ NotNull Runnable runnable )
58+ throws RejectedExecutionException {
5859 if (executorService .getQueue ().size () < MAX_QUEUE_SIZE ) {
5960 return executorService .submit (runnable );
6061 }
@@ -67,7 +68,8 @@ public SentryExecutorService() {
6768 }
6869
6970 @ Override
70- public @ NotNull <T > Future <T > submit (final @ NotNull Callable <T > callable ) throws RejectedExecutionException {
71+ public @ NotNull <T > Future <T > submit (final @ NotNull Callable <T > callable )
72+ throws RejectedExecutionException {
7173 if (executorService .getQueue ().size () < MAX_QUEUE_SIZE ) {
7274 return executorService .submit (callable );
7375 }
@@ -80,7 +82,8 @@ public SentryExecutorService() {
8082 }
8183
8284 @ Override
83- public @ NotNull Future <?> schedule (final @ NotNull Runnable runnable , final long delayMillis ) throws RejectedExecutionException {
85+ public @ NotNull Future <?> schedule (final @ NotNull Runnable runnable , final long delayMillis )
86+ throws RejectedExecutionException {
8487 if (executorService .getQueue ().size () < MAX_QUEUE_SIZE ) {
8588 return executorService .schedule (runnable , delayMillis , TimeUnit .MILLISECONDS );
8689 }
@@ -124,10 +127,12 @@ public void prewarm() {
124127 executorService .submit (
125128 () -> {
126129 try {
127- // schedule a bunch of dummy runnables in the future that will never execute to trigger
130+ // schedule a bunch of dummy runnables in the future that will never execute to
131+ // trigger
128132 // queue growth and then purge the queue
129133 for (int i = 0 ; i < INITIAL_QUEUE_SIZE ; i ++) {
130- final Future <?> future = executorService .schedule (dummyRunnable , 365L , TimeUnit .DAYS );
134+ final Future <?> future =
135+ executorService .schedule (dummyRunnable , 365L , TimeUnit .DAYS );
131136 future .cancel (true );
132137 }
133138 executorService .purge ();
0 commit comments