私はハッシュベースのプログラムに取り組んでいます。私の質問は、文字列の HashCode がアプリケーション全体で同じままになるかどうかです。
Memcached サーバー内の KetamaMemcachedSessionLocator がこのように機能するため、これを尋ねた理由は、Memcache が実行されているサーバーが 2 つある場合、特定のサーバーからキーを検索したいからです。
String key = "MyString";
int keyid = key.hashCode();
int v = keyid % 1; //( I assume that this will contact the First Server to retrieve that value )
int v = keyid % 2; //( I assume that this will contact the Second Server to retrieve that value )
String value = MemcachedClient.get(key, v);
当サイトを参考に上記を実施
http://dev.mysql.com/doc/refman/5.0/en/ha-memcached-using-hashtypes.html
上記の方法で問題が発生した場合は、意見を共有してください。