references in objects
Dustin Sallings
dustin at spy.net
Fri Aug 10 09:03:51 UTC 2007
On Aug 10, 2007, at 1:13, Cam Bazz wrote:
> Consider the following scenario where I have an object:
>
> class Node {
> int id;
> Node next;
> }
>
> and I am storing these in memcached, such as:
>
> Node n;
> put( n.id, n);
>
> when I get(int) a node, can I trace the reference next, without
> requiring a map lookup?
memcached is just a hash table. For example:
Map<Integer, Node> m=new HashMap<Integer, Node>();
m.put(n.id, n);
Can you get n.next in that example without doing another map lookup?
Furthermore, it doesn't attempt to understand the data you're giving
it. The value is a blob and memcached can not and should not
understand what it actually means.
--
Dustin Sallings
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20070810/d2ed2889/attachment.html
More information about the memcached
mailing list