Class RestMasterPlugin
java.lang.Object
io.vertigo.stella.plugins.work.rest.master.RestMasterPlugin
- All Implemented Interfaces:
io.vertigo.core.node.component.Component,io.vertigo.core.node.component.CoreComponent,io.vertigo.core.node.component.Plugin,MasterPlugin,io.vertigo.vega.webservice.WebServices
@PathPrefix("/backend/workQueue")
public final class RestMasterPlugin
extends Object
implements MasterPlugin, io.vertigo.vega.webservice.WebServices
Exécution synchrone et distante des Works avec un transfert par WS REST.
- Author:
- npiedeloup, pchretien
-
Constructor Summary
ConstructorsConstructorDescriptionRestMasterPlugin(int timeoutSeconds, io.vertigo.commons.codec.CodecManager codecManager) Constructeur. -
Method Summary
Modifier and TypeMethodDescriptioncheckDeadNodesAndWorkItems(int maxRetry) Check for dead nodes and manage (retry) unfinished workItems.pollResult(String callerNodeId, int waitTimeSeconds) Wait for next result.<R,W> void putWorkItem(WorkItem<R, W> workItem) Add a WorkItem to do
-
Constructor Details
-
RestMasterPlugin
@Inject public RestMasterPlugin(int timeoutSeconds, io.vertigo.commons.codec.CodecManager codecManager) Constructeur.- Parameters:
timeoutSeconds- Timeout des travaux en attente de traitementcodecManager- Manager d'encodage/decodagedaemonManager- Manager des daemons
-
-
Method Details
-
checkDeadNodesAndWorkItems
Description copied from interface:MasterPluginCheck for dead nodes and manage (retry) unfinished workItems.- Specified by:
checkDeadNodesAndWorkItemsin interfaceMasterPlugin- Parameters:
maxRetry- max number of retry- Returns:
- WorkIds retried, WorkId abandonned
-
pollResult
Wait for next result.- Specified by:
pollResultin interfaceMasterPlugin- Parameters:
callerNodeId-waitTimeSeconds- wait result for x seconds- Returns:
- Work result (null if none) : may be any result type
-
putWorkItem
Add a WorkItem to do- Specified by:
putWorkItemin interfaceMasterPlugin- Type Parameters:
R- Result typeW- Work type- Parameters:
workItem- Work item
-