Examples of metaSetInSession()


Examples of com.tinkerpop.rexster.protocol.msg.ScriptRequestMessage.metaSetInSession()

        Assert.assertTrue(((ScriptResponseMessage) inMsg).Results.get() != null);

        final ScriptRequestMessage scriptMessage2 = new ScriptRequestMessage();
        scriptMessage2.Script = "m = n + 1";
        scriptMessage2.LanguageName = "groovy";
        scriptMessage2.metaSetInSession(true);
        scriptMessage2.setRequestAsUUID(UUID.randomUUID());
        scriptMessage2.Session = BitWorks.convertUUIDToByteArray(sessionKey);

        inMsg = client.execute(scriptMessage2);
        Assert.assertTrue(inMsg instanceof ScriptResponseMessage);
View Full Code Here

Examples of com.tinkerpop.rexster.protocol.msg.ScriptRequestMessage.metaSetInSession()

        //test that it works
        final ScriptRequestMessage scriptMessage = new ScriptRequestMessage();
        scriptMessage.Script = "n = 5\nn";
        scriptMessage.LanguageName = "groovy";
        scriptMessage.metaSetInSession(true);
        scriptMessage.metaSetIsolate(false);
        scriptMessage.setRequestAsUUID(UUID.randomUUID());
        scriptMessage.Session = BitWorks.convertUUIDToByteArray(sessionKey);

        inMsg = client.execute(scriptMessage);
View Full Code Here

Examples of com.tinkerpop.rexster.protocol.msg.ScriptRequestMessage.metaSetInSession()

        // test that 'n' is available if the isolate meta flag is set to false
        final ScriptRequestMessage scriptMessage2 = new ScriptRequestMessage();
        scriptMessage2.Script = "m = n + o";
        scriptMessage2.LanguageName = "groovy";
        scriptMessage2.Bindings.put("o", 5);
        scriptMessage2.metaSetInSession(true);
        scriptMessage2.setRequestAsUUID(UUID.randomUUID());
        scriptMessage2.Session = BitWorks.convertUUIDToByteArray(sessionKey);

        inMsg = client.execute(scriptMessage2);
        Assert.assertTrue(inMsg instanceof ScriptResponseMessage);
View Full Code Here

Examples of com.tinkerpop.rexster.protocol.msg.ScriptRequestMessage.metaSetInSession()

        //test that it works
        final ScriptRequestMessage scriptMessage = new ScriptRequestMessage();
        scriptMessage.Script = "n = 5\nn";
        scriptMessage.LanguageName = "groovy";
        scriptMessage.metaSetInSession(true);
        scriptMessage.metaSetTransaction(true);
        scriptMessage.setRequestAsUUID(UUID.randomUUID());
        scriptMessage.Session = BitWorks.convertUUIDToByteArray(sessionKey);

        inMsg = client.execute(scriptMessage);
View Full Code Here

Examples of com.tinkerpop.rexster.protocol.msg.ScriptRequestMessage.metaSetInSession()

        for (Map.Entry<String, Map<String,String>> entry : getAvailableGraphs(client).entrySet()) {
            final ScriptRequestMessage scriptMessage = new ScriptRequestMessage();
            scriptMessage.Script = "graph.addVertex()";
            scriptMessage.LanguageName = "groovy";
            scriptMessage.metaSetInSession(false);
            scriptMessage.metaSetGraphName(entry.getKey());
            scriptMessage.metaSetGraphObjName("graph");
            scriptMessage.metaSetTransaction(true);
            scriptMessage.setRequestAsUUID(UUID.randomUUID());
            scriptMessage.Session = null;
View Full Code Here

Examples of com.tinkerpop.rexster.protocol.msg.ScriptRequestMessage.metaSetInSession()

        ScriptRequestMessage scriptMessage = new ScriptRequestMessage();
        scriptMessage.setSessionAsUUID(session.getSessionKey());
        scriptMessage.Script = script;

        scriptMessage.LanguageName = "groovy";
        scriptMessage.metaSetInSession(true);
        scriptMessage.setRequestAsUUID(UUID.randomUUID());
        return scriptMessage;
    }
}
View Full Code Here

Examples of com.tinkerpop.rexster.protocol.msg.ScriptRequestMessage.metaSetInSession()

        final ScriptRequestMessage scriptMessage = new ScriptRequestMessage();
        scriptMessage.Script = script;
        scriptMessage.LanguageName = this.language;
        scriptMessage.metaSetGraphName(this.graphName);
        scriptMessage.metaSetGraphObjName(this.graphObjName);
        scriptMessage.metaSetInSession(false);
        scriptMessage.metaSetTransaction(this.transaction);
        scriptMessage.setRequestAsUUID(UUID.randomUUID());

        scriptMessage.validateMetaData();
View Full Code Here

Examples of com.tinkerpop.rexster.protocol.msg.ScriptRequestMessage.metaSetInSession()

    public static Map<String, Map<String,String>> getAvailableGraphs(final RexsterClient client) throws RexProException, IOException {
        //try to use the graph on the session
        final ScriptRequestMessage scriptMessage = new ScriptRequestMessage();
        scriptMessage.Script = "merged=[:];rexster.getGraphNames().collect{[(\"${it}\".toString()):rexster.getGraph(it).features.toMap()]}.collectMany{it.entrySet()}.each{merged[it.key] = it.value};merged";
        scriptMessage.LanguageName = "groovy";
        scriptMessage.metaSetInSession(false);
        scriptMessage.setRequestAsUUID(UUID.randomUUID());

        final RexProMessage inMsg = client.execute(scriptMessage);

        if (inMsg instanceof ErrorResponseMessage) {
View Full Code Here

Examples of com.tinkerpop.rexster.protocol.msg.ScriptRequestMessage.metaSetInSession()

        //try to use the killed session
        final ScriptRequestMessage scriptMessage = new ScriptRequestMessage();
        scriptMessage.Script = "5";
        scriptMessage.LanguageName = "groovy";
        scriptMessage.metaSetInSession(true);
        scriptMessage.setRequestAsUUID(UUID.randomUUID());
        scriptMessage.Session = BitWorks.convertUUIDToByteArray(sessionKey);

        inMsg = client.execute(scriptMessage);
        Assert.assertTrue(inMsg instanceof ErrorResponseMessage);
View Full Code Here

Examples of com.tinkerpop.rexster.protocol.msg.ScriptRequestMessage.metaSetInSession()

            //try to use the graph on the session
            final ScriptRequestMessage scriptMessage = new ScriptRequestMessage();
            scriptMessage.Script = "graph.addVertex()";
            scriptMessage.LanguageName = "groovy";
            scriptMessage.metaSetInSession(true);
            scriptMessage.setRequestAsUUID(UUID.randomUUID());
            scriptMessage.Session = BitWorks.convertUUIDToByteArray(sessionKey);

            inMsg = client.execute(scriptMessage);
            Assert.assertTrue(inMsg instanceof ScriptResponseMessage);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.