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 Details

    • RestMasterPlugin

      @Inject public RestMasterPlugin(int timeoutSeconds, io.vertigo.commons.codec.CodecManager codecManager)
      Constructeur.
      Parameters:
      timeoutSeconds - Timeout des travaux en attente de traitement
      codecManager - Manager d'encodage/decodage
      daemonManager - Manager des daemons
  • Method Details

    • checkDeadNodesAndWorkItems

      public io.vertigo.core.lang.Tuple<Set<String>,Set<String>> checkDeadNodesAndWorkItems(int maxRetry)
      Description copied from interface: MasterPlugin
      Check for dead nodes and manage (retry) unfinished workItems.
      Specified by:
      checkDeadNodesAndWorkItems in interface MasterPlugin
      Parameters:
      maxRetry - max number of retry
      Returns:
      WorkIds retried, WorkId abandonned
    • pollResult

      public WorkResult pollResult(String callerNodeId, int waitTimeSeconds)
      Wait for next result.
      Specified by:
      pollResult in interface MasterPlugin
      Parameters:
      callerNodeId -
      waitTimeSeconds - wait result for x seconds
      Returns:
      Work result (null if none) : may be any result type
    • putWorkItem

      public <R, W> void putWorkItem(WorkItem<R,W> workItem)
      Add a WorkItem to do
      Specified by:
      putWorkItem in interface MasterPlugin
      Type Parameters:
      R - Result type
      W - Work type
      Parameters:
      workItem - Work item