当前位置: 首页>>代码示例>>Java>>正文


Java ResultMessage.Void方法代码示例

本文整理汇总了Java中org.apache.cassandra.transport.messages.ResultMessage.Void方法的典型用法代码示例。如果您正苦于以下问题:Java ResultMessage.Void方法的具体用法?Java ResultMessage.Void怎么用?Java ResultMessage.Void使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.cassandra.transport.messages.ResultMessage的用法示例。


在下文中一共展示了ResultMessage.Void方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: processStatement

import org.apache.cassandra.transport.messages.ResultMessage; //导入方法依赖的package包/类
public ResultMessage processStatement(CQLStatement statement, QueryState queryState, QueryOptions options)
throws RequestExecutionException, RequestValidationException
{
    logger.trace("Process {} @CL.{}", statement, options.getConsistency());
    ClientState clientState = queryState.getClientState();
    statement.checkAccess(clientState);
    statement.validate(clientState);

    ResultMessage result = statement.execute(queryState, options);
    return result == null ? new ResultMessage.Void() : result;
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:12,代码来源:QueryProcessor.java

示例2: execute

import org.apache.cassandra.transport.messages.ResultMessage; //导入方法依赖的package包/类
private ResultMessage execute(QueryState queryState, BatchQueryOptions options, boolean local, long now)
throws RequestExecutionException, RequestValidationException
{
    if (options.getConsistency() == null)
        throw new InvalidRequestException("Invalid empty consistency level");
    if (options.getSerialConsistency() == null)
        throw new InvalidRequestException("Invalid empty serial consistency level");

    if (hasConditions)
        return executeWithConditions(options, queryState);

    executeWithoutConditions(getMutations(options, local, now), options.getConsistency());
    return new ResultMessage.Void();
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:15,代码来源:BatchStatement.java

示例3: resultMessage

import org.apache.cassandra.transport.messages.ResultMessage; //导入方法依赖的package包/类
private ResultMessage resultMessage(List<PermissionDetails> details)
{
    if (details.isEmpty())
        return new ResultMessage.Void();

    ResultSet result = new ResultSet(metadata);
    for (PermissionDetails pd : details)
    {
        result.addColumnValue(UTF8Type.instance.decompose(pd.username));
        result.addColumnValue(UTF8Type.instance.decompose(pd.resource.toString()));
        result.addColumnValue(UTF8Type.instance.decompose(pd.permission.toString()));
    }
    return new ResultMessage.Rows(result);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:15,代码来源:ListPermissionsStatement.java

示例4: execute

import org.apache.cassandra.transport.messages.ResultMessage; //导入方法依赖的package包/类
public ResultMessage execute(QueryState state, QueryOptions options) throws RequestValidationException
{
    // If an IF [NOT] EXISTS clause was used, this may not result in an actual schema change.  To avoid doing
    // extra work in the drivers to handle schema changes, we return an empty message in this case. (CASSANDRA-7600)
    boolean didChangeSchema = announceMigration(false);
    return didChangeSchema ? new ResultMessage.SchemaChange(changeEvent()) : new ResultMessage.Void();
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:8,代码来源:SchemaAlteringStatement.java

示例5: executeInternal

import org.apache.cassandra.transport.messages.ResultMessage; //导入方法依赖的package包/类
public ResultMessage executeInternal(QueryState state, QueryOptions options)
{
    try
    {
        boolean didChangeSchema = announceMigration(true);
        return didChangeSchema ? new ResultMessage.SchemaChange(changeEvent()) : new ResultMessage.Void();
    }
    catch (RequestValidationException e)
    {
        throw new RuntimeException(e);
    }
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:13,代码来源:SchemaAlteringStatement.java

示例6: processStatement

import org.apache.cassandra.transport.messages.ResultMessage; //导入方法依赖的package包/类
private static ResultMessage processStatement(CQLStatement statement, QueryState queryState, QueryOptions options)
throws RequestExecutionException, RequestValidationException
{
    logger.trace("Process {} @CL.{}", statement, options.getConsistency());
    ClientState clientState = queryState.getClientState();
    statement.checkAccess(clientState);
    statement.validate(clientState);
    ResultMessage result = statement.execute(queryState, options);
    return result == null ? new ResultMessage.Void() : result;
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:11,代码来源:QueryProcessor.java

示例7: processBatch

import org.apache.cassandra.transport.messages.ResultMessage; //导入方法依赖的package包/类
public static ResultMessage processBatch(BatchStatement batch, ConsistencyLevel cl, QueryState queryState, List<List<ByteBuffer>> variables)
throws RequestExecutionException, RequestValidationException
{
    ClientState clientState = queryState.getClientState();
    batch.checkAccess(clientState);
    batch.validate(clientState);
    batch.executeWithPerStatementVariables(cl, queryState, variables);
    return new ResultMessage.Void();
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:10,代码来源:QueryProcessor.java

示例8: resultMessage

import org.apache.cassandra.transport.messages.ResultMessage; //导入方法依赖的package包/类
private ResultMessage resultMessage(Set<RoleResource> roles)
{
    if (roles.isEmpty())
        return new ResultMessage.Void();

    List<RoleResource> sorted = Lists.newArrayList(roles);
    Collections.sort(sorted);
    return formatResults(sorted);
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:10,代码来源:ListRolesStatement.java

示例9: executeInternal

import org.apache.cassandra.transport.messages.ResultMessage; //导入方法依赖的package包/类
public ResultMessage executeInternal(QueryState queryState, QueryOptions options) throws RequestValidationException, RequestExecutionException
{
    if (hasConditions)
        return executeInternalWithConditions(BatchQueryOptions.withoutPerStatementVariables(options), queryState);

    executeInternalWithoutCondition(queryState, options);
    return new ResultMessage.Void();
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:9,代码来源:BatchStatement.java

示例10: resultMessage

import org.apache.cassandra.transport.messages.ResultMessage; //导入方法依赖的package包/类
private ResultMessage resultMessage(List<PermissionDetails> details)
{
    if (details.isEmpty())
        return new ResultMessage.Void();

    ResultSet result = new ResultSet(metadata);
    for (PermissionDetails pd : details)
    {
        result.addColumnValue(UTF8Type.instance.decompose(pd.grantee));
        result.addColumnValue(UTF8Type.instance.decompose(pd.grantee));
        result.addColumnValue(UTF8Type.instance.decompose(pd.resource.toString()));
        result.addColumnValue(UTF8Type.instance.decompose(pd.permission.toString()));
    }
    return new ResultMessage.Rows(result);
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:16,代码来源:ListPermissionsStatement.java

示例11: execute

import org.apache.cassandra.transport.messages.ResultMessage; //导入方法依赖的package包/类
public ResultMessage execute(QueryState state, QueryOptions options) throws RequestValidationException
{
    // If an IF [NOT] EXISTS clause was used, this may not result in an actual schema change.  To avoid doing
    // extra work in the drivers to handle schema changes, we return an empty message in this case. (CASSANDRA-7600)
    Event.SchemaChange ce = announceMigration(false);
    if (ce == null)
        return new ResultMessage.Void();

    // when a schema alteration results in a new db object being created, we grant permissions on the new
    // object to the user performing the request if:
    // * the user is not anonymous
    // * the configured IAuthorizer supports granting of permissions (not all do, AllowAllAuthorizer doesn't and
    //   custom external implementations may not)
    AuthenticatedUser user = state.getClientState().getUser();
    if (user != null && !user.isAnonymous() && ce.change == Event.SchemaChange.Change.CREATED)
    {
        try
        {
            grantPermissionsToCreator(state);
        }
        catch (UnsupportedOperationException e)
        {
            // not a problem, grant is an optional method on IAuthorizer
        }
    }

    return new ResultMessage.SchemaChange(ce);
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:29,代码来源:SchemaAlteringStatement.java

示例12: executeInternal

import org.apache.cassandra.transport.messages.ResultMessage; //导入方法依赖的package包/类
public ResultMessage executeInternal(QueryState state, QueryOptions options)
{
    Event.SchemaChange ce = announceMigration(true);
    return ce == null ? new ResultMessage.Void() : new ResultMessage.SchemaChange(ce);
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:6,代码来源:SchemaAlteringStatement.java


注:本文中的org.apache.cassandra.transport.messages.ResultMessage.Void方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。