本文整理汇总了C++中DataObjectRef::getABEStatus方法的典型用法代码示例。如果您正苦于以下问题:C++ DataObjectRef::getABEStatus方法的具体用法?C++ DataObjectRef::getABEStatus怎么用?C++ DataObjectRef::getABEStatus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataObjectRef
的用法示例。
在下文中一共展示了DataObjectRef::getABEStatus方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Event
void
DataManager::handleVerifiedDataObject(DataObjectRef& dObj)
{
if (!dObj) {
HAGGLE_ERR ("Handle verified object received null object.\n");
return;
}
if(networkCodingConfiguration->isNetworkCodingEnabled(dObj,NULL) &&
!networkCodingConfiguration->isForwardingEnabled()) {
if(networkCodingDataObjectUtility->isNetworkCodedDataObject(dObj)) {
if (dObj->isDuplicate()) {
HAGGLE_DBG("Data object %s is a duplicate! Not generating DATAOBJECT_NEW event\n", dObj->getIdStr());
} else {
kernel->addEvent(new Event(EVENT_TYPE_DATAOBJECT_NEW, dObj));
return;
}
}
}
if(fragmentationConfiguration->isFragmentationEnabled(dObj,NULL) &&
!fragmentationConfiguration->isForwardingEnabled()) {
if(fragmentationDataObjectUtility->isFragmentationDataObject(dObj)) {
if (dObj->isDuplicate()) {
HAGGLE_DBG("Data object %s is a duplicate! Not generating DATAOBJECT_NEW event\n", dObj->getIdStr());
} else {
kernel->addEvent(new Event(EVENT_TYPE_DATAOBJECT_NEW, dObj));
return;
}
}
}
// MOS - add data object to Bloomfilter to cover the case
// where there was no incoming event (e.g. encrypting data object from local app)
if (dObj->getABEStatus() != DataObject::ABE_NOT_NEEDED && !localBF->has(dObj)) {
localBF->add(dObj);
HAGGLE_DBG("Adding encrypted data object [%s] to our bloomfilter, #objs=%d\n", DataObject::idString(dObj).c_str(), localBF->numObjects());
kernel->getThisNode()->getBloomfilter()->add(dObj); // MOS
}
if (cacheStrategy && !cacheStrategy->isDone() && cacheStrategy->isResponsibleForDataObject(dObj)) {
cacheStrategy->handleNewDataObject(dObj);
}
else {
//default action for dObj's that are NOT handled by cache strat code
insertDataObjectIntoDataStore (dObj);
}
}