Search in sources :

Example 1 with GaiaPortsResponse

use of com.alibaba.maxgraph.servers.jna.GaiaPortsResponse in project GraphScope by alibaba.

the class GaiaEngine method start.

@Override
public void start() {
    try (GaiaPortsResponse gaiaPortsResponse = GaiaLibrary.INSTANCE.startEngine(this.pointer)) {
        if (!gaiaPortsResponse.success) {
            throw new MaxGraphException(gaiaPortsResponse.errMsg);
        }
        engineNodeProvider.apply(gaiaPortsResponse.enginePort);
        rpcNodeProvider.apply(gaiaPortsResponse.rpcPort);
    }
    this.engineDiscovery.start();
    this.engineDiscovery.addListener(this);
    this.rpcDiscovery.start();
}
Also used : GaiaPortsResponse(com.alibaba.maxgraph.servers.jna.GaiaPortsResponse) MaxGraphException(com.alibaba.maxgraph.compiler.api.exception.MaxGraphException)

Example 2 with GaiaPortsResponse

use of com.alibaba.maxgraph.servers.jna.GaiaPortsResponse in project GraphScope by alibaba.

the class GaiaEngine method start.

@Override
public void start() {
    try (GaiaPortsResponse gaiaPortsResponse = GaiaLibrary.INSTANCE.startEngine(this.pointer)) {
        if (!gaiaPortsResponse.success) {
            throw new MaxGraphException(gaiaPortsResponse.errMsg);
        }
        engineNodeProvider.apply(gaiaPortsResponse.enginePort);
        rpcNodeProvider.apply(gaiaPortsResponse.rpcPort);
    }
    this.engineDiscovery.start();
    this.engineDiscovery.addListener(this);
    this.rpcDiscovery.start();
}
Also used : GaiaPortsResponse(com.alibaba.maxgraph.servers.jna.GaiaPortsResponse) MaxGraphException(com.alibaba.maxgraph.compiler.api.exception.MaxGraphException)

Aggregations

MaxGraphException (com.alibaba.maxgraph.compiler.api.exception.MaxGraphException)2 GaiaPortsResponse (com.alibaba.maxgraph.servers.jna.GaiaPortsResponse)2