本文整理汇总了Java中org.apache.cassandra.dht.LocalToken类的典型用法代码示例。如果您正苦于以下问题:Java LocalToken类的具体用法?Java LocalToken怎么用?Java LocalToken使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LocalToken类属于org.apache.cassandra.dht包,在下文中一共展示了LocalToken类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getIndexKeyFor
import org.apache.cassandra.dht.LocalToken; //导入依赖的package包/类
/**
* Returns the decoratedKey for a column value
* @param value column value
* @return decorated key
*/
public DecoratedKey getIndexKeyFor(ByteBuffer value)
{
// FIXME: this imply one column definition per index
ByteBuffer name = columnDefs.iterator().next().name.bytes;
return new BufferDecoratedKey(new LocalToken(baseCfs.metadata.getColumnDefinition(name).type, value), value);
}
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:12,代码来源:SecondaryIndex.java
示例2: getIndexKeyFor
import org.apache.cassandra.dht.LocalToken; //导入依赖的package包/类
/**
* Returns the decoratedKey for a column value
* @param value column value
* @return decorated key
*/
public DecoratedKey getIndexKeyFor(ByteBuffer value)
{
// FIXME: this imply one column definition per index
ByteBuffer name = columnDefs.iterator().next().name.bytes;
return new DecoratedKey(new LocalToken(baseCfs.metadata.getColumnDefinition(name).type, value), value);
}
开发者ID:rajath26,项目名称:cassandra-trunk,代码行数:12,代码来源:SecondaryIndex.java
示例3: cleanupIndexEntry
import org.apache.cassandra.dht.LocalToken; //导入依赖的package包/类
public static void cleanupIndexEntry(ColumnFamilyStore cfs, ByteBuffer key, IColumn column)
{
if (column.isMarkedForDelete())
return;
int localDeletionTime = (int) (System.currentTimeMillis() / 1000);
DecoratedKey<LocalToken> valueKey = cfs.getIndexKeyFor(column.name(), column.value());
ColumnFamily cfi = cfs.newIndexedColumnFamily(column.name());
cfi.addTombstone(key, localDeletionTime, column.timestamp());
Memtable fullMemtable = cfs.getIndexedColumnFamilyStore(column.name()).apply(valueKey, cfi);
if (logger.isDebugEnabled())
logger.debug("removed index entry for cleaned-up value {}:{}", valueKey, cfi);
if (fullMemtable != null)
fullMemtable.cfs.maybeSwitchMemtable(fullMemtable, false);
}
开发者ID:devdattakulkarni,项目名称:Cassandra-KVPM,代码行数:15,代码来源:Table.java
示例4: getIndexKeyFor
import org.apache.cassandra.dht.LocalToken; //导入依赖的package包/类
@Override
public DecoratedKey getIndexKeyFor(ByteBuffer value)
{
return new BufferDecoratedKey(new LocalToken(getIndexKeyComparator(), value), value);
}
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:6,代码来源:AbstractSimplePerColumnSecondaryIndex.java
示例5: getIndexKeyFor
import org.apache.cassandra.dht.LocalToken; //导入依赖的package包/类
@Override
public DecoratedKey getIndexKeyFor(ByteBuffer value)
{
return new DecoratedKey(new LocalToken(getIndexKeyComparator(), value), value);
}
开发者ID:rajath26,项目名称:cassandra-trunk,代码行数:6,代码来源:AbstractSimplePerColumnSecondaryIndex.java
注:本文中的org.apache.cassandra.dht.LocalToken类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论