It is a hash code.  It is not really used to pick the exact bucket/server, but more useful to control that certain different objects live on one server.  The benefit to this is in the use of getMulti() to stream multiple objects back over one connection.  So for example, if I wanted a bunch of objects that we all related, say, a bunch of objects related to a single user account, to be retrievable in one getMulti(), I could set them w/ a specific hash code to ensure they all live on one cache server.
<br><br>gw<br><br><div><span class="gmail_quote">On 1/9/07, <b class="gmail_sendername">S Edirisinghe</b> &lt;<a href="mailto:edirisinghe.s@gmail.com">edirisinghe.s@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks greg. So what does the integer mean? Is it,eg bucket #45 ? Does bucket 45 translate to server 45 or would I have to read up the code on how buckets are chosen to really understand what&#39;s going?<br><br>cheers<br>

<br><div><span class="gmail_quote">On 1/9/07, <b class="gmail_sendername">Greg Whalin</b> &lt;<a href="mailto:greg@meetup.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">greg@meetup.com</a>&gt; wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The 3 argument version of that which takes the hash allows the caller to override the chosen bucket by passing in a specified hash key.&nbsp; By default, you can just call mc.set( key, value) and rely on the client to determine the memcache server internally.
<br><br>greg<div><span><br><br><div><span class="gmail_quote">On 1/9/07, <b class="gmail_sendername">S Edirisinghe</b> &lt;<a href="mailto:edirisinghe.s@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

edirisinghe.s@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all, <br><br>I&#39;m new to the list and have not found out how to search the archive. While I find out how, I will post this (hopefully not-stupid ) question.<br><br>I&#39;m using the java client so, I&#39;ll ask about the method in the javadoc
<br><pre>        MemCachedClient mc = new MemCachedClient();<br>        String key   = &quot;cacheKey1&quot;;     <br>        Object value = SomeClass.getObject();   <br>        Integer hash = new Integer(45); <br>        
<br><br><br>mc.set(key, value, hash);</pre><br>What is the hash (Integer)&nbsp; arg to this method do? Is this a way for picking the bucket? I wasn&#39;t sure if this was a seed for the hash function ? I&#39;m pretty new to using memcache d. Your help is appreciated.
<br><br>thanks<br><br>

</blockquote></div><br><br clear="all"><br></span></div>-- <br><span>Greg Whalin

</span></blockquote></div><br>

</blockquote></div><br><br clear="all"><br>-- <br>Greg Whalin