Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Datastructure: A bunch of nodes connected with each other that form a loop.
- Each node has a pointer to the previous node and a pointer to the next node.
- node - node - node - node
- | |
- node node
- | |
- node - node - node - node
- The world is divided into regions.
- A node can be in multiple regions.
- Region1()
- Region2[]
- (node0 - node1 - [node2) - node3 - node4]
- Each region will be serialized (saved on the HD).
- When loading back into the cache the datastructure should be restored. However not all regions will be in the cache at the same time.
- if Region1 loads into cache it contains node1, node2 and node3. Thats cool.
- But sometime Region2 may be loaded into cache too. Region 2 contains node2, node3 and node 4. I need a way to find out that the node2 is the same object in both regions and link it up so that I get a final data structure like: node0-node1-node2-node3-node4.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement