Interface IProcessingUnitProxy
-
- All Known Implementing Classes:
ProcessingUnitProxy
public interface IProcessingUnitProxyDefines theIProcessingUnitproxy. It manages the full handling for startup, possible suspends/resumes and ending even the validation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetId()Get the runnable idjava.lang.LonggetMaxNumberOfProcessingUnitCallsPerSecond()Get the max number of processing unit calls per secondsjava.lang.StringgetName()Get the runnable name or nulljava.util.List<ParameterDefinition>getParameterDefinition()Gets the parameter definition list of the processing.IProcessingUnitProgressgetProcessingUnitProgress()Gets the processing unit progressvoidonAborting()This method is called in case of an abort (status aborting) before the resources are released.voidonEnding()This method is called on ending after a successful end (status ending) before the resources are released.booleanprocessUnit()Process unit: This method will be called until theIProcessingUnitStatus.hasNext()returns false or an exception occurs: RuntimeException will abort; ValidationException or ProcessingException depends on the value returned by the method abortProcessing.voidreleaseResource()Release resources will be called to release all internal referenced resources after a processing success, error or by asuspendProcessing(see method below).byte[]suspendProcessing()Suspends the processing: The processing is able to persist its state with the help of theIProcessingUnitPersistenceobject.
-
-
-
Method Detail
-
getId
java.lang.String getId()
Get the runnable id- Returns:
- the runnable id
-
getName
java.lang.String getName()
Get the runnable name or null- Returns:
- the name or null
-
getParameterDefinition
java.util.List<ParameterDefinition> getParameterDefinition()
Gets the parameter definition list of the processing.- Returns:
- the parameter definition list or null in case of no parameters
-
getProcessingUnitProgress
IProcessingUnitProgress getProcessingUnitProgress()
Gets the processing unit progress- Returns:
- the processing unit progress
-
getMaxNumberOfProcessingUnitCallsPerSecond
java.lang.Long getMaxNumberOfProcessingUnitCallsPerSecond()
Get the max number of processing unit calls per seconds- Returns:
- The max number of processing unit calls per seconds
-
processUnit
boolean processUnit()
Process unit: This method will be called until theIProcessingUnitStatus.hasNext()returns false or an exception occurs: RuntimeException will abort; ValidationException or ProcessingException depends on the value returned by the method abortProcessing. Important: this method have to process the sequential or in a small block size.- Returns:
- true to continue the processing; otherwise false
-
onEnding
void onEnding()
This method is called on ending after a successful end (status ending) before the resources are released.
-
onAborting
void onAborting()
This method is called in case of an abort (status aborting) before the resources are released.
-
suspendProcessing
byte[] suspendProcessing() throws ProcessingExceptionSuspends the processing: The processing is able to persist its state with the help of theIProcessingUnitPersistenceobject. On a resume this instance of theIProcessingUnitPersistencewill be returned (see method below).- Returns:
- the processing persistence which contains all information to resume processing later (see resumeProcessing).
- Throws:
ProcessingException- Throws this exception in case of while suspend the processing any failures occurs.
-
releaseResource
void releaseResource() throws ProcessingExceptionRelease resources will be called to release all internal referenced resources after a processing success, error or by asuspendProcessing(see method below). It will be called afteronEnding()oronAborting().- Throws:
ProcessingException- Throws this exception in case of releasing failure.
-
-