Package org.apache.cassandra.transport.messages

Examples of org.apache.cassandra.transport.messages.ResultMessage


    throws RequestExecutionException, RequestValidationException
    {
        ClientState clientState = queryState.getClientState();
        statement.validate(clientState);
        statement.checkAccess(clientState);
        ResultMessage result = statement.execute(cl, queryState, variables);
        return result == null ? new ResultMessage.Void() : result;
    }
View Full Code Here


    public static UntypedResultSet process(String query) throws RequestExecutionException
    {
        try
        {
            QueryState state = new QueryState(new ClientState(true));
            ResultMessage result = process(query, ConsistencyLevel.ONE, state);
            if (result instanceof ResultMessage.Rows)
                return new UntypedResultSet(((ResultMessage.Rows)result).result);
            else
                return null;
        }
View Full Code Here

            ClientState state = new ClientState(true);
            QueryState qState = new QueryState(state);
            state.setKeyspace(Table.SYSTEM_KS);
            CQLStatement statement = getStatement(query, state).statement;
            statement.validate(state);
            ResultMessage result = statement.executeInternal(qState);
            if (result instanceof ResultMessage.Rows)
                return new UntypedResultSet(((ResultMessage.Rows)result).result);
            else
                return null;
        }
View Full Code Here

    {
        logger.trace("Process {} @CL.{}", statement, cl);
        ClientState clientState = queryState.getClientState();
        statement.validate(clientState);
        statement.checkAccess(clientState);
        ResultMessage result = statement.execute(cl, queryState, variables);
        return result == null ? new ResultMessage.Void() : result;
    }
View Full Code Here

    public static UntypedResultSet process(String query, ConsistencyLevel cl) throws RequestExecutionException
    {
        try
        {
            QueryState state = new QueryState(new ClientState(true));
            ResultMessage result = process(query, cl, state);
            if (result instanceof ResultMessage.Rows)
                return new UntypedResultSet(((ResultMessage.Rows)result).result);
            else
                return null;
        }
View Full Code Here

            ClientState state = new ClientState(true);
            QueryState qState = new QueryState(state);
            state.setKeyspace(Table.SYSTEM_KS);
            CQLStatement statement = getStatement(query, state).statement;
            statement.validate(state);
            ResultMessage result = statement.executeInternal(qState);
            if (result instanceof ResultMessage.Rows)
                return new UntypedResultSet(((ResultMessage.Rows)result).result);
            else
                return null;
        }
View Full Code Here

        logger.trace("Process {} @CL.{}", statement, options.getConsistency());
        ClientState clientState = queryState.getClientState();
        statement.checkAccess(clientState);
        statement.validate(clientState);

        ResultMessage result = preExecutionHooks.isEmpty() && postExecutionHooks.isEmpty()
                             ? statement.execute(queryState, options)
                             : executeWithHooks(statement, new ExecutionContext(queryState, queryString, options));

        return result == null ? new ResultMessage.Void() : result;
    }
View Full Code Here

    throws RequestExecutionException, RequestValidationException
    {
        for (PreExecutionHook hook : preExecutionHooks)
           statement = hook.processStatement(statement, context);

        ResultMessage result = statement.execute(context.queryState, context.queryOptions);

        for (PostExecutionHook hook : postExecutionHooks)
            hook.processStatement(statement, context);

        return result;
View Full Code Here

    public static UntypedResultSet process(String query, ConsistencyLevel cl) throws RequestExecutionException
    {
        try
        {
            ResultMessage result = process(query, QueryState.forInternalCalls(), new QueryOptions(cl, Collections.<ByteBuffer>emptyList()));
            if (result instanceof ResultMessage.Rows)
                return new UntypedResultSet(((ResultMessage.Rows)result).result);
            else
                return null;
        }
View Full Code Here

            ClientState state = ClientState.forInternalCalls();
            QueryState qState = new QueryState(state);
            state.setKeyspace(Keyspace.SYSTEM_KS);
            CQLStatement statement = getStatement(query, state).statement;
            statement.validate(state);
            ResultMessage result = statement.executeInternal(qState);
            if (result instanceof ResultMessage.Rows)
                return new UntypedResultSet(((ResultMessage.Rows)result).result);
            else
                return null;
        }
View Full Code Here

TOP

Related Classes of org.apache.cassandra.transport.messages.ResultMessage

Copyright © 2018 www.massapicom. 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.