<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=us-ascii" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Evan Martin wrote:
<blockquote cite="mid20041214043807.GC40932@trout" type="cite">
  <pre wrap="">On Sun, Dec 12, 2004 at 10:28:39PM -0800, Kevin A. Burton wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">[snip]

If we assume the basic types are interned we could use the first byte as 
the type with the remaining bytes as the value.  Then on get() we could 
read the first byte to determine the type and then construct the correct 
object for it.  This would prevent the ClassCastException I talked about 
above.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
You can also use the memcached per-item flags to specially store a few
sorts of types: n bits allows for 2^n different representations.  Byte,
int, and string ought to be enough for most uses.

  </pre>
</blockquote>
Yeah... honestly I saw that and it looked interesting.&nbsp; Whats the size
of the flag?&nbsp; How many bits?&nbsp; <br>
<br>
I really only have 10 types I have to represent and right now the
java-memcached driver only needs to represent 11 flags (one being gzip
compression).<br>
<br>
Kevin<br>
<pre class="moz-signature" cols="72">-- 

Use Rojo (RSS/Atom aggregator).  Visit <a class="moz-txt-link-freetext" href="http://rojo.com">http://rojo.com</a>. Ask me for an 
invite!  Also see irc.freenode.net #rojo if you want to chat.

Rojo is Hiring! - <a class="moz-txt-link-freetext" href="http://www.rojonetworks.com/JobsAtRojo.html">http://www.rojonetworks.com/JobsAtRojo.html</a>

If you're interested in RSS, Weblogs, Social Networking, etc... then you 
should work for Rojo!  If you recommend someone and we hire them you'll 
get a free iPod!
    
Kevin A. Burton, Location - San Francisco, CA
       AIM/YIM - sfburtonator,  Web - <a class="moz-txt-link-freetext" href="http://peerfear.org/">http://peerfear.org/</a>
GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412
</pre>
</body>
</html>