Resolves checkstyle errors for guarded-suspension, half-sync-half-async, hexagonal (#1064)
* Reduces checkstyle errors in guarded-suspension * Reduces checkstyle errors in half-sync-half-async * Reduces checkstyle errors in hexagonal
This commit is contained in:
committed by
Ilkka Seppälä
parent
4f9ee0189c
commit
dda09535e6
guarded-suspension/src/main/java/com/iluwatar/guarded/suspension
half-sync-half-async/src/main/java/com/iluwatar/halfsynchalfasync
hexagonal/src/main/java/com/iluwatar/hexagonal
App.java
administration
banking
database
domain
LotteryAdministration.javaLotteryConstants.javaLotteryNumbers.javaLotteryService.javaLotteryTicket.javaLotteryTicketCheckResult.javaLotteryTicketId.javaLotteryUtils.javaPlayerDetails.java
eventlog
module
mongo
sampledata
service
@ -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 {
|
||||
|
Reference in New Issue
Block a user