Class MasterManagerImpl

  • All Implemented Interfaces:
    io.vertigo.core.node.component.Activeable, io.vertigo.core.node.component.Component, io.vertigo.core.node.component.CoreComponent, io.vertigo.core.node.component.Manager, MasterManager

    public final class MasterManagerImpl
    extends Object
    implements MasterManager, io.vertigo.core.node.component.Activeable
    Implémentation de workManager.
    Author:
    pchretien, npiedeloup
    • Constructor Detail

      • MasterManagerImpl

        @Inject
        public MasterManagerImpl​(MasterPlugin masterPlugin)
        Constructeur.
        Parameters:
        masterPlugin - Optional plugin for work's distribution
    • Method Detail

      • start

        public void start()
        Specified by:
        start in interface io.vertigo.core.node.component.Activeable
      • stop

        public void stop()
        Specified by:
        stop in interface io.vertigo.core.node.component.Activeable
      • process

        public <W,​R> WorkPromise<R> process​(W work,
                                                  Class<? extends WorkEngine<W,​R>> workEngineClass)
        Exécution d'un travail de façon synchrone.
        Specified by:
        process in interface MasterManager
        Type Parameters:
        W - Type de Work (Travail)
        R - Produit d'un work à l'issu de son exécution
        Parameters:
        work - Travail à exécuter
        Returns:
        result
      • schedule

        public <W,​R> void schedule​(W work,
                                         Class<? extends WorkEngine<W,​R>> workEngineClass,
                                         WorkResultHandler<R> workResultHandler)
        Description copied from interface: MasterManager
        Lancement asynchrone d'un travail 'dès que possible'.
        Specified by:
        schedule in interface MasterManager
        Type Parameters:
        W - Type de Work (Travail)
        R - Produit d'un work à l'issu de son exécution
        Parameters:
        work - Travail à exécuter
        workResultHandler - Handler permettant un callback après exécution