本文整理汇总了C++中PersistentTable::getNewestTupleID方法的典型用法代码示例。如果您正苦于以下问题:C++ PersistentTable::getNewestTupleID方法的具体用法?C++ PersistentTable::getNewestTupleID怎么用?C++ PersistentTable::getNewestTupleID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PersistentTable
的用法示例。
在下文中一共展示了PersistentTable::getNewestTupleID方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: next
bool EvictionIterator::next(TableTuple &tuple)
{
PersistentTable* ptable = static_cast<PersistentTable*>(table);
if(current_tuple_id == ptable->getNewestTupleID()) // we've already returned the last tuple in the chain
{
VOLT_DEBUG("No more tuples in the chain.");
return false;
}
if(current_tuple_id == -1) // this is the first call to next
{
VOLT_DEBUG("This is the first tuple in the chain.");
if(ptable->getNumTuplesInEvictionChain() == 0) // there are no tuples in the chain
{
VOLT_DEBUG("There are no tuples in the eviction chain.");
return false;
}
current_tuple_id = ptable->getOldestTupleID();
}
else // advance the iterator to the next tuple in the chain
{
current_tuple_id = current_tuple->getTupleID();
}
current_tuple->move(ptable->dataPtrForTuple(current_tuple_id));
tuple.move(current_tuple->address());
VOLT_DEBUG("current_tuple_id = %d", current_tuple_id);
return true;
}
开发者ID:Arpit-Mittal,项目名称:Hbase-Hstore-Hadoop-Implementation-Cassandra,代码行数:34,代码来源:EvictionIterator.cpp
示例2: hasNext
bool EvictionIterator::hasNext()
{
PersistentTable* ptable = static_cast<PersistentTable*>(table);
if(current_tuple_id == ptable->getNewestTupleID())
return false;
if(ptable->usedTupleCount() == 0)
return false;
if(ptable->getNumTuplesInEvictionChain() == 0) { // there are no tuples in the chain
VOLT_DEBUG("There are no tuples in the eviction chain.");
return false;
}
return true;
}
开发者ID:Arpit-Mittal,项目名称:Hbase-Hstore-Hadoop-Implementation-Cassandra,代码行数:15,代码来源:EvictionIterator.cpp
示例3: next
bool EvictionIterator::next(TableTuple &tuple)
{
#ifndef ANTICACHE_TIMESTAMPS
PersistentTable* ptable = static_cast<PersistentTable*>(table);
if(current_tuple_id == ptable->getNewestTupleID()) // we've already returned the last tuple in the chain
{
VOLT_DEBUG("No more tuples in the chain.");
return false;
}
if(is_first) // this is the first call to next
{
is_first = false;
VOLT_DEBUG("This is the first tuple in the chain.");
if(ptable->getNumTuplesInEvictionChain() == 0) // there are no tuples in the chain
{
VOLT_DEBUG("There are no tuples in the eviction chain.");
return false;
}
current_tuple_id = ptable->getOldestTupleID();
}
else // advance the iterator to the next tuple in the chain
{
current_tuple_id = current_tuple->getNextTupleInChain();
}
current_tuple->move(ptable->dataPtrForTuple(current_tuple_id));
tuple.move(current_tuple->address());
VOLT_DEBUG("current_tuple_id = %d", current_tuple_id);
#else
tuple.move(candidates[current_tuple_id].m_addr);
current_tuple_id++;
while (candidates[current_tuple_id].m_addr == candidates[current_tuple_id - 1].m_addr) {
current_tuple_id++;
if (current_tuple_id == m_size) break;
}
#endif
return true;
}
示例4: hasNext
bool EvictionIterator::hasNext()
{
VOLT_TRACE("Size: %lu\n", (long unsigned int)m_size);
PersistentTable* ptable = static_cast<PersistentTable*>(table);
VOLT_TRACE("Count: %lu %lu\n", ptable->usedTupleCount(), ptable->activeTupleCount());
if(ptable->usedTupleCount() == 0)
return false;
#ifndef ANTICACHE_TIMESTAMPS
if(current_tuple_id == ptable->getNewestTupleID())
return false;
if(ptable->getNumTuplesInEvictionChain() == 0) { // there are no tuples in the chain
VOLT_DEBUG("There are no tuples in the eviction chain.");
return false;
}
#else
if (current_tuple_id == m_size)
return false;
#endif
return true;
}