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


Java StorageProxy.mutateWithTriggers方法代码示例

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


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

示例1: doInsert

import org.apache.cassandra.service.StorageProxy; //导入方法依赖的package包/类
private void doInsert(ConsistencyLevel consistency_level, List<? extends IMutation> mutations, boolean mutateAtomically)
throws UnavailableException, TimedOutException, org.apache.cassandra.exceptions.InvalidRequestException
{
    org.apache.cassandra.db.ConsistencyLevel consistencyLevel = ThriftConversion.fromThrift(consistency_level);
    consistencyLevel.validateForWrite(state().getKeyspace());
    if (mutations.isEmpty())
        return;

    long timeout = Long.MAX_VALUE;
    for (IMutation m : mutations)
        timeout = Longs.min(timeout, m.getTimeout());

    schedule(timeout);
    try
    {
        StorageProxy.mutateWithTriggers(mutations, consistencyLevel, mutateAtomically);
    }
    catch (RequestExecutionException e)
    {
        ThriftConversion.rethrow(e);
    }
    finally
    {
        release();
    }
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:27,代码来源:CassandraServer.java

示例2: doInsert

import org.apache.cassandra.service.StorageProxy; //导入方法依赖的package包/类
private void doInsert(ConsistencyLevel consistency_level, List<? extends IMutation> mutations, boolean mutateAtomically)
throws UnavailableException, TimedOutException, org.apache.cassandra.exceptions.InvalidRequestException
{
    org.apache.cassandra.db.ConsistencyLevel consistencyLevel = ThriftConversion.fromThrift(consistency_level);
    consistencyLevel.validateForWrite(state().getKeyspace());
    if (mutations.isEmpty())
        return;

    schedule(DatabaseDescriptor.getWriteRpcTimeout());
    try
    {
        StorageProxy.mutateWithTriggers(mutations, consistencyLevel, mutateAtomically);
    }
    catch (RequestExecutionException e)
    {
        ThriftConversion.rethrow(e);
    }
    finally
    {
        release();
    }
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:23,代码来源:CassandraServer.java

示例3: executeWithoutCondition

import org.apache.cassandra.service.StorageProxy; //导入方法依赖的package包/类
private ResultMessage executeWithoutCondition(QueryState queryState, QueryOptions options)
throws RequestExecutionException, RequestValidationException
{
    ConsistencyLevel cl = options.getConsistency();
    if (isCounter())
        cl.validateCounterForWrite(cfm);
    else
        cl.validateForWrite(cfm.ksName);

    Collection<? extends IMutation> mutations = getMutations(options, false, options.getTimestamp(queryState));
    if (!mutations.isEmpty())
        StorageProxy.mutateWithTriggers(mutations, cl, false);

    return null;
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:16,代码来源:ModificationStatement.java

示例4: executeWithoutConditions

import org.apache.cassandra.service.StorageProxy; //导入方法依赖的package包/类
private void executeWithoutConditions(Collection<? extends IMutation> mutations, ConsistencyLevel cl) throws RequestExecutionException, RequestValidationException
{
    // Extract each collection of cfs from it's IMutation and then lazily concatenate all of them into a single Iterable.
    Iterable<ColumnFamily> cfs = Iterables.concat(Iterables.transform(mutations, new Function<IMutation, Collection<ColumnFamily>>()
    {
        public Collection<ColumnFamily> apply(IMutation im)
        {
            return im.getColumnFamilies();
        }
    }));
    verifyBatchSize(cfs);

    boolean mutateAtomic = (type == Type.LOGGED && mutations.size() > 1);
    StorageProxy.mutateWithTriggers(mutations, cl, mutateAtomic);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:16,代码来源:BatchStatement.java

示例5: executeWithoutCondition

import org.apache.cassandra.service.StorageProxy; //导入方法依赖的package包/类
private ResultMessage executeWithoutCondition(QueryState queryState, QueryOptions options)
throws RequestExecutionException, RequestValidationException
{
    ConsistencyLevel cl = options.getConsistency();
    if (isCounter())
        cl.validateCounterForWrite(cfm);
    else
        cl.validateForWrite(cfm.ksName);

    Collection<? extends IMutation> mutations = getMutations(options.getValues(), false, cl, queryState.getTimestamp(), false);
    if (!mutations.isEmpty())
        StorageProxy.mutateWithTriggers(mutations, cl, false);

    return null;
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:16,代码来源:ModificationStatement.java

示例6: executeWithoutCondition

import org.apache.cassandra.service.StorageProxy; //导入方法依赖的package包/类
private ResultMessage executeWithoutCondition(QueryState queryState, QueryOptions options)
throws RequestExecutionException, RequestValidationException
{
    ConsistencyLevel cl = options.getConsistency();
    if (isCounter())
        cl.validateCounterForWrite(cfm);
    else
        cl.validateForWrite(cfm.ksName);

    Collection<? extends IMutation> mutations = getMutations(options.getValues(), false, cl, queryState.getTimestamp());
    if (!mutations.isEmpty())
        StorageProxy.mutateWithTriggers(mutations, cl, false);

    return null;
}
 
开发者ID:rajath26,项目名称:cassandra-trunk,代码行数:16,代码来源:ModificationStatement.java

示例7: execute

import org.apache.cassandra.service.StorageProxy; //导入方法依赖的package包/类
private void execute(Collection<? extends IMutation> mutations, ConsistencyLevel cl) throws RequestExecutionException, RequestValidationException
{
    boolean mutateAtomic = (type == Type.LOGGED && mutations.size() > 1);
    StorageProxy.mutateWithTriggers(mutations, cl, mutateAtomic);
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:6,代码来源:BatchStatement.java

示例8: executeWithoutConditions

import org.apache.cassandra.service.StorageProxy; //导入方法依赖的package包/类
private void executeWithoutConditions(Collection<? extends IMutation> mutations, ConsistencyLevel cl) throws RequestExecutionException, RequestValidationException
{
    boolean mutateAtomic = (type == Type.LOGGED && mutations.size() > 1);
    StorageProxy.mutateWithTriggers(mutations, cl, mutateAtomic);
}
 
开发者ID:rajath26,项目名称:cassandra-trunk,代码行数:6,代码来源:BatchStatement.java


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