Resolves checkstyle errors for guarded-suspension, half-sync-half-async, hexagonal ()

* Reduces checkstyle errors in guarded-suspension

* Reduces checkstyle errors in half-sync-half-async

* Reduces checkstyle errors in hexagonal
This commit is contained in:
Anurag Agarwal
2019-11-10 22:31:32 +05:30
committed by Ilkka Seppälä
parent 4f9ee0189c
commit dda09535e6
34 changed files with 382 additions and 359 deletions

@ -23,15 +23,14 @@
package com.iluwatar.halfsynchalfasync;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.FutureTask;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* This is the asynchronous layer which does not block when a new request arrives. It just passes
@ -63,13 +62,14 @@ public class AsynchronousService {
/**
* A non-blocking method which performs the task provided in background and returns immediately.
* <p>
* On successful completion of task the result is posted back using callback method
* {@link AsyncTask#onPostCall(Object)}, if task execution is unable to complete normally due to
* some exception then the reason for error is posted back using callback method
* {@link AsyncTask#onError(Throwable)}.
* <p>
* NOTE: The results are posted back in the context of background thread in this implementation.
*
* <p>On successful completion of task the result is posted back using callback method {@link
* AsyncTask#onPostCall(Object)}, if task execution is unable to complete normally due to some
* exception then the reason for error is posted back using callback method {@link
* AsyncTask#onError(Throwable)}.
*
* <p>NOTE: The results are posted back in the context of background thread in this
* implementation.
*/
public <T> void execute(final AsyncTask<T> task) {
try {