예제 #1
0
static bool read_pnode(bool &result, metadata::dhtnode_t &node, buffer_wrapper val) {
    if (!result)
	return false;
    if (val.size() != 0 && val.getValue(&node, true))
	return true;
    result = false;
    return false;
}
예제 #2
0
bool null_bw_map::write(const buffer_wrapper &key, const buffer_wrapper &value) {
    if (value.size() > space_left)
	return false;
    if (buffer_wrapper_cache->max_size() == buffer_wrapper_cache->size())
	buffer_wrapper_cache->resize(buffer_wrapper_cache->size() + 1);
    buffer_wrapper_cache->write(key, value);
    space_left -= value.size();
    return true;
}
예제 #3
0
 bool set_providers(metadata::query_t &key, buffer_wrapper val) {
     page_key = key;
     return val.size() != 0 && val.getValue(&providers, true);
 }
예제 #4
0
static inline bool read_node(metadata::dhtnode_t &node, buffer_wrapper val) {
    return val.size() != 0 && val.getValue(&node, true);
}