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


Java ClientState.hasKeyspaceAccess方法代码示例

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


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

示例1: system_add_column_family

import org.apache.cassandra.service.ClientState; //导入方法依赖的package包/类
public String system_add_column_family(CfDef cf_def)
throws InvalidRequestException, SchemaDisagreementException, TException
{
    logger.debug("add_column_family");

    try
    {
        ClientState cState = state();
        String keyspace = cState.getKeyspace();
        cState.hasKeyspaceAccess(keyspace, Permission.CREATE);
        cf_def.unsetId(); // explicitly ignore any id set by client (Hector likes to set zero)
        CFMetaData cfm = CFMetaData.fromThrift(cf_def);
        CFMetaData.validateCompactionOptions(cfm.compactionStrategyClass, cfm.compactionStrategyOptions);
        cfm.addDefaultIndexNames();

        if (!cfm.getTriggers().isEmpty())
            state().ensureIsSuper("Only superusers are allowed to add triggers.");

        MigrationManager.announceNewColumnFamily(cfm);
        return Schema.instance.getVersion().toString();
    }
    catch (RequestValidationException e)
    {
        throw ThriftConversion.toThrift(e);
    }
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:27,代码来源:CassandraServer.java

示例2: checkAccess

import org.apache.cassandra.service.ClientState; //导入方法依赖的package包/类
public void checkAccess(ClientState state) throws UnauthorizedException, InvalidRequestException
{
    state.hasKeyspaceAccess(name, Permission.ALTER);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:5,代码来源:AlterKeyspaceStatement.java

示例3: checkAccess

import org.apache.cassandra.service.ClientState; //导入方法依赖的package包/类
public void checkAccess(ClientState state) throws UnauthorizedException, InvalidRequestException
{
    state.hasKeyspaceAccess(keyspace(), Permission.DROP);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:5,代码来源:DropTypeStatement.java

示例4: checkAccess

import org.apache.cassandra.service.ClientState; //导入方法依赖的package包/类
public void checkAccess(ClientState state) throws UnauthorizedException, InvalidRequestException
{
    state.hasKeyspaceAccess(keyspace(), Permission.CREATE);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:5,代码来源:CreateTableStatement.java

示例5: checkAccess

import org.apache.cassandra.service.ClientState; //导入方法依赖的package包/类
public void checkAccess(ClientState state) throws UnauthorizedException, InvalidRequestException
{
    state.hasKeyspaceAccess(keyspace, Permission.DROP);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:5,代码来源:DropKeyspaceStatement.java

示例6: checkAccess

import org.apache.cassandra.service.ClientState; //导入方法依赖的package包/类
public void checkAccess(ClientState state) throws UnauthorizedException, InvalidRequestException
{
    state.hasKeyspaceAccess(keyspace(), Permission.ALTER);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:5,代码来源:AlterTypeStatement.java

示例7: checkAccess

import org.apache.cassandra.service.ClientState; //导入方法依赖的package包/类
public void checkAccess(ClientState state) throws UnauthorizedException, InvalidRequestException
{
    // TODO CASSANDRA-7557 (function DDL permission)

    state.hasKeyspaceAccess(functionName.keyspace, Permission.DROP);
}
 
开发者ID:scylladb,项目名称:scylla-tools-java,代码行数:7,代码来源:DropAggregateStatement.java


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