Search in sources :

Example 1 with GremlinServer

use of org.apache.tinkerpop.gremlin.server.GremlinServer in project cypher-for-gremlin by opencypher.

the class EmbeddedGremlinServer method start.

public void start() {
    if (gremlinServer != null) {
        throw new IllegalStateException("EmbeddedGremlinServer already started!");
    }
    try {
        gremlinServer = new GremlinServer(settings);
        gremlinServer.start().join();
        logger.info("EmbeddedGremlinServer started (port {})", getPort());
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
}
Also used : GremlinServer(org.apache.tinkerpop.gremlin.server.GremlinServer) IOException(java.io.IOException) UncheckedIOException(java.io.UncheckedIOException)

Example 2 with GremlinServer

use of org.apache.tinkerpop.gremlin.server.GremlinServer in project janusgraph by JanusGraph.

the class AbstractGremlinServerIntegrationTest method startServer.

public void startServer() throws Exception {
    final InputStream stream = getSettingsInputStream();
    final Settings settings = Settings.read(stream);
    final Settings overridenSettings = overrideSettings(settings);
    if (GREMLIN_SERVER_EPOLL) {
        overridenSettings.useEpollEventLoop = true;
    }
    this.server = new GremlinServer(overridenSettings);
    server.start().join();
}
Also used : GremlinServer(org.apache.tinkerpop.gremlin.server.GremlinServer) InputStream(java.io.InputStream) Settings(org.apache.tinkerpop.gremlin.server.Settings)

Example 3 with GremlinServer

use of org.apache.tinkerpop.gremlin.server.GremlinServer in project janusgraph by JanusGraph.

the class AbstractGremlinServerIntegrationTest method startServer.

public void startServer(final Settings settings) throws Exception {
    if (null == settings) {
        startServer();
    } else {
        final Settings overridenSettings = overrideSettings(settings);
        if (GREMLIN_SERVER_EPOLL) {
            overridenSettings.useEpollEventLoop = true;
        }
        this.server = new GremlinServer(overridenSettings);
        server.start().join();
    }
}
Also used : GremlinServer(org.apache.tinkerpop.gremlin.server.GremlinServer) Settings(org.apache.tinkerpop.gremlin.server.Settings)

Aggregations

GremlinServer (org.apache.tinkerpop.gremlin.server.GremlinServer)3 Settings (org.apache.tinkerpop.gremlin.server.Settings)2 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 UncheckedIOException (java.io.UncheckedIOException)1