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


Java ColumnFamily.addAtom方法代码示例

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


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

示例1: execute

import org.apache.cassandra.db.ColumnFamily; //导入方法依赖的package包/类
public void execute(ByteBuffer rowKey, ColumnFamily cf, Composite prefix, UpdateParameters params) throws InvalidRequestException
{
    if (column.type.isMultiCell())
    {
        // delete + add
        CellName name = cf.getComparator().create(prefix, column);
        cf.addAtom(params.makeTombstoneForOverwrite(name.slice()));
    }
    Adder.doAdd(t, cf, prefix, column, params);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:11,代码来源:Sets.java

示例2: execute

import org.apache.cassandra.db.ColumnFamily; //导入方法依赖的package包/类
public void execute(ByteBuffer rowKey, ColumnFamily cf, Composite prefix, UpdateParameters params) throws InvalidRequestException
{
    if (column.type.isMultiCell())
    {
        // delete + append
        CellName name = cf.getComparator().create(prefix, column);
        cf.addAtom(params.makeTombstoneForOverwrite(name.slice()));
    }
    Appender.doAppend(t, cf, prefix, column, params);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:11,代码来源:Lists.java

示例3: doAppend

import org.apache.cassandra.db.ColumnFamily; //导入方法依赖的package包/类
static void doAppend(Term t, ColumnFamily cf, Composite prefix, ColumnDefinition column, UpdateParameters params) throws InvalidRequestException
{
    Term.Terminal value = t.bind(params.options);
    Lists.Value listValue = (Lists.Value)value;
    if (column.type.isMultiCell())
    {
        // If we append null, do nothing. Note that for Setter, we've
        // already removed the previous value so we're good here too
        if (value == null)
            return;

        List<ByteBuffer> toAdd = listValue.elements;
        for (int i = 0; i < toAdd.size(); i++)
        {
            ByteBuffer uuid = ByteBuffer.wrap(UUIDGen.getTimeUUIDBytes());
            cf.addColumn(params.makeColumn(cf.getComparator().create(prefix, column, uuid), toAdd.get(i)));
        }
    }
    else
    {
        // for frozen lists, we're overwriting the whole cell value
        CellName name = cf.getComparator().create(prefix, column);
        if (value == null)
            cf.addAtom(params.makeTombstone(name));
        else
            cf.addColumn(params.makeColumn(name, listValue.getWithProtocolVersion(Server.CURRENT_VERSION)));
    }
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:29,代码来源:Lists.java

示例4: execute

import org.apache.cassandra.db.ColumnFamily; //导入方法依赖的package包/类
public void execute(ByteBuffer rowKey, ColumnFamily cf, Composite prefix, UpdateParameters params) throws InvalidRequestException
{
    if (column.type.isMultiCell())
    {
        // delete + put
        CellName name = cf.getComparator().create(prefix, column);
        cf.addAtom(params.makeTombstoneForOverwrite(name.slice()));
    }
    Putter.doPut(t, cf, prefix, column, params);
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:11,代码来源:Maps.java

示例5: execute

import org.apache.cassandra.db.ColumnFamily; //导入方法依赖的package包/类
public void execute(ByteBuffer rowKey, ColumnFamily cf, ColumnNameBuilder prefix, UpdateParameters params) throws InvalidRequestException
{
    // delete + add
    ColumnNameBuilder column = prefix.add(columnName.key);
    cf.addAtom(params.makeTombstoneForOverwrite(column.build(), column.buildAsEndOfRange()));
    Adder.doAdd(t, cf, column, params);
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:8,代码来源:Sets.java

示例6: execute

import org.apache.cassandra.db.ColumnFamily; //导入方法依赖的package包/类
public void execute(ByteBuffer rowKey, ColumnFamily cf, ColumnNameBuilder prefix, UpdateParameters params) throws InvalidRequestException
{
    // delete + append
    ColumnNameBuilder column = prefix.add(columnName.key);
    cf.addAtom(params.makeTombstoneForOverwrite(column.build(), column.buildAsEndOfRange()));
    Appender.doAppend(t, cf, column, params);
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:8,代码来源:Lists.java

示例7: execute

import org.apache.cassandra.db.ColumnFamily; //导入方法依赖的package包/类
public void execute(ByteBuffer rowKey, ColumnFamily cf, ColumnNameBuilder prefix, UpdateParameters params) throws InvalidRequestException
{
    ColumnNameBuilder column = prefix.add(columnName.key);

    if (isCollection)
        cf.addAtom(params.makeRangeTombstone(column.build(), column.buildAsEndOfRange()));
    else
        cf.addColumn(params.makeTombstone(column.build()));
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:10,代码来源:Constants.java

示例8: execute

import org.apache.cassandra.db.ColumnFamily; //导入方法依赖的package包/类
public void execute(ByteBuffer rowKey, ColumnFamily cf, ColumnNameBuilder prefix, UpdateParameters params) throws InvalidRequestException
{
    // delete + put
    ColumnNameBuilder column = prefix.add(columnName.key);
    cf.addAtom(params.makeTombstoneForOverwrite(column.build(), column.buildAsEndOfRange()));
    Putter.doPut(t, cf, column, params);
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:8,代码来源:Maps.java

示例9: updatesWithPaxosTime

import org.apache.cassandra.db.ColumnFamily; //导入方法依赖的package包/类
private static ColumnFamily updatesWithPaxosTime(ColumnFamily updates, UUID ballot)
{
    ColumnFamily cf = updates.cloneMeShallow();
    long t = UUIDGen.microsTimestamp(ballot);
    // For the tombstones, we use t-1 so that when insert a collection literall, the range tombstone that deletes the previous values of
    // the collection and we want that to have a lower timestamp and our new values. Since tombstones wins over normal insert, using t-1
    // should not be a problem in general (see #6069).
    cf.deletionInfo().updateAllTimestamp(t-1);
    for (Column column : updates)
        cf.addAtom(column.withUpdatedTimestamp(t));
    return cf;
}
 
开发者ID:pgaref,项目名称:ACaZoo,代码行数:13,代码来源:Commit.java


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