Research Article
A Splay Tree-Based Approach for Efficient Resource Location in P2P Networks
// Splay Finger Table Lookup | // Return the successor of key | n·slookup(key) | (1) if (key is between S·id and T·id) | (2) = splay_search(, key) | (3) if ( is sentinel) | (4) remove_sentinel_root() | (5) n′ = ·root | (6) if (·id == key) | (7) return | (8) = ·slookup(key) | (9) else | (10) = T·slookup(key) | (11) if (Count < CACHE_MAX) | (12) splay_insert(, ) | (13) | (14) | (15) return |
|