本文整理汇总了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);
}
示例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);
}
示例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);
}
示例4: getIndexKeyFor
import org.apache.cassandra.dht.LocalToken; //导入依赖的package包/类
@Override
public DecoratedKey getIndexKeyFor(ByteBuffer value)
{
return new BufferDecoratedKey(new LocalToken(getIndexKeyComparator(), value), value);
}
示例5: getIndexKeyFor
import org.apache.cassandra.dht.LocalToken; //导入依赖的package包/类
@Override
public DecoratedKey getIndexKeyFor(ByteBuffer value)
{
return new DecoratedKey(new LocalToken(getIndexKeyComparator(), value), value);
}