M
- R
- public abstract class BasicAsynchronousModuleDelegate<M extends IAsynchronousModule,R> extends java.lang.Object implements IAsynchronousModuleDelegate<M,R>
BlockingTimedEvent
such that the synchronization will occurr minimumProcessingTime after the
start of the request.Constructor and Description |
---|
BasicAsynchronousModuleDelegate(M module,
R cantProcessResult) |
Modifier and Type | Method and Description |
---|---|
M |
getModule()
get the module this is installed into
|
java.util.concurrent.CompletableFuture<R> |
process(IRequest request,
double requestTime,
java.lang.Object... parameters)
everything is based on a
ChunkPattern . |
protected abstract R |
processInternal(IRequest request,
double requestTime,
java.lang.Object... parameters)
called on the asynchronous thread, this does the actual processing,
returning some result.
|
protected void |
processInternalCompleted(IRequest request,
R result,
java.lang.Object... parameters)
called on the asynch thread after processInternal has completed.
|
protected abstract boolean |
shouldProcess(IRequest request,
java.lang.Object... parameters)
Called on the initiating thread (i.e.
|
public M getModule()
IAsynchronousModuleDelegate
getModule
in interface IAsynchronousModuleDelegate<M extends IAsynchronousModule,R>
public java.util.concurrent.CompletableFuture<R> process(IRequest request, double requestTime, java.lang.Object... parameters)
IAsynchronousModuleDelegate
ChunkPattern
. This will start the
processing and return some result, usually an IChunk
process
in interface IAsynchronousModuleDelegate<M extends IAsynchronousModule,R>
protected void processInternalCompleted(IRequest request, R result, java.lang.Object... parameters)
request
- result
- startTime
- harvestAt
- protected abstract boolean shouldProcess(IRequest request, java.lang.Object... parameters)
#processInternal(ChunkPattern)
on the asynchronous
executor.request
-