parent
35e61483df
commit
5080c46ebd
|
@ -2499,6 +2499,36 @@ KVstore::isEntity(TYPE_ENTITY_LITERAL_ID id)
|
|||
return id < Util::LITERAL_FIRST_ID;
|
||||
}
|
||||
|
||||
void
|
||||
KVstore::AddIntoSubCache(TYPE_ENTITY_LITERAL_ID _entity_id)
|
||||
{
|
||||
this->subID2values->AddIntoCache(_entity_id);
|
||||
}
|
||||
|
||||
void
|
||||
KVstore::AddIntoObjCache(TYPE_ENTITY_LITERAL_ID _entity_literal_id)
|
||||
{
|
||||
this->objID2values->AddIntoCache(_entity_literal_id);
|
||||
}
|
||||
|
||||
unsigned
|
||||
KVstore::getSubListSize(TYPE_ENTITY_LITERAL_ID _sub_id)
|
||||
{
|
||||
unsigned* _tmp = NULL;
|
||||
unsigned _ret;
|
||||
this->getValueByKey(this->subID2values, _sub_id, (char*&) _tmp, _ret);
|
||||
return _ret;
|
||||
}
|
||||
|
||||
unsigned
|
||||
KVstore::getObjListSize(TYPE_ENTITY_LITERAL_ID _obj_id)
|
||||
{
|
||||
unsigned* _tmp = NULL;
|
||||
unsigned _ret;
|
||||
this->getValueByKey(this->objID2values, _obj_id, (char*&) _tmp, _ret);
|
||||
return _ret;
|
||||
}
|
||||
|
||||
//TODO+BETTER: adjust the buffer size according to current memory usage(global memory manager)
|
||||
//better to adjust these parameters according to memory usage and entity num
|
||||
//need a memory manager first
|
||||
|
|
Loading…
Reference in New Issue