Class WorkerAggrManager
- java.lang.Object
-
- org.apache.hugegraph.computer.core.aggregator.WorkerAggrManager
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAME
-
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 voidafterSuperstep(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>
VaggregatedValue(java.lang.String name)<V extends org.apache.hugegraph.computer.core.graph.value.Value>
voidaggregateValue(java.lang.String name, V value)voidbeforeSuperstep(org.apache.hugegraph.computer.core.config.Config config, int superstep)Do some initialization for a superstep.voidclose(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)voidinit(org.apache.hugegraph.computer.core.config.Config config)Used to add the resources needed by the computation.java.lang.Stringname()The unique identify name.voidservice(AggregateRpcService service)
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
name
public java.lang.String name()
Description copied from interface:ManagerThe unique identify name.
-
init
public void init(org.apache.hugegraph.computer.core.config.Config config)
Description copied from interface:ManagerUsed to add the resources needed by the computation. Be called only one time before all supersteps start.
-
close
public void close(org.apache.hugegraph.computer.core.config.Config config)
Description copied from interface:ManagerClose the resources used in the computation. Be called only one time after all supersteps ended.
-
beforeSuperstep
public void beforeSuperstep(org.apache.hugegraph.computer.core.config.Config config, int superstep)Description copied from interface:ManagerDo 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:
beforeSuperstepin interfaceManager
-
afterSuperstep
public void afterSuperstep(org.apache.hugegraph.computer.core.config.Config config, int superstep)Description copied from interface:ManagerDo 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:
afterSuperstepin interfaceManager
-
service
public void service(AggregateRpcService service)
-
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)
-
-