Class WorkerAggrManager

  • All Implemented Interfaces:
    Manager

    public class WorkerAggrManager
    extends java.lang.Object
    implements Manager
    Aggregator manager manages aggregators in worker.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String NAME  
    • Constructor Summary

      Constructors 
      Constructor Description
      WorkerAggrManager​(org.apache.hugegraph.computer.core.common.ComputerContext context)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterSuperstep​(org.apache.hugegraph.computer.core.config.Config config, int superstep)
      Do some clean up for a superstep.
      <V extends org.apache.hugegraph.computer.core.graph.value.Value>
      V
      aggregatedValue​(java.lang.String name)  
      <V extends org.apache.hugegraph.computer.core.graph.value.Value>
      void
      aggregateValue​(java.lang.String name, V value)  
      void beforeSuperstep​(org.apache.hugegraph.computer.core.config.Config config, int superstep)
      Do some initialization for a superstep.
      void close​(org.apache.hugegraph.computer.core.config.Config config)
      Close the resources used in the computation.
      <V extends org.apache.hugegraph.computer.core.graph.value.Value>
      org.apache.hugegraph.computer.core.aggregator.Aggregator<V>
      createAggregator​(java.lang.String name)  
      void init​(org.apache.hugegraph.computer.core.config.Config config)
      Used to add the resources needed by the computation.
      java.lang.String name()
      The unique identify name.
      void service​(AggregateRpcService service)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.hugegraph.computer.core.manager.Manager

        inited
    • Constructor Detail

      • WorkerAggrManager

        public WorkerAggrManager​(org.apache.hugegraph.computer.core.common.ComputerContext context)
    • Method Detail

      • name

        public java.lang.String name()
        Description copied from interface: Manager
        The unique identify name.
        Specified by:
        name in interface Manager
      • init

        public void init​(org.apache.hugegraph.computer.core.config.Config config)
        Description copied from interface: Manager
        Used to add the resources needed by the computation. Be called only one time before all supersteps start.
        Specified by:
        init in interface Manager
      • close

        public void close​(org.apache.hugegraph.computer.core.config.Config config)
        Description copied from interface: Manager
        Close the resources used in the computation. Be called only one time after all supersteps ended.
        Specified by:
        close in interface Manager
      • beforeSuperstep

        public void beforeSuperstep​(org.apache.hugegraph.computer.core.config.Config config,
                                    int superstep)
        Description copied from interface: Manager
        Do some initialization for a superstep. Be called before a superstep. Subclass should override this method if wants to do something before a superstep.
        Specified by:
        beforeSuperstep in interface Manager
      • afterSuperstep

        public void afterSuperstep​(org.apache.hugegraph.computer.core.config.Config config,
                                   int superstep)
        Description copied from interface: Manager
        Do some clean up for a superstep. Be called after a superstep. Subclass should override this method if wants to do something after a superstep.
        Specified by:
        afterSuperstep in interface Manager
      • createAggregator

        public <V extends org.apache.hugegraph.computer.core.graph.value.Value> org.apache.hugegraph.computer.core.aggregator.Aggregator<V> createAggregator​(java.lang.String name)
      • aggregateValue

        public <V extends org.apache.hugegraph.computer.core.graph.value.Value> void aggregateValue​(java.lang.String name,
                                                                                                    V value)
      • aggregatedValue

        public <V extends org.apache.hugegraph.computer.core.graph.value.Value> V aggregatedValue​(java.lang.String name)