KeyMapper is used with D2's consistent hashing mechanism to maintain key to host affinity across a set of functionally similar hosts. A typical use case for this affinity is to allow the service provider to maintain cache affinity, for better resource utilization. Note that there are no strict partitioning guarantees, since failure or overload conditions can cause the same key to be mapped to another host on subsequent requests. Similarly, different clients may have temporally inconsistent views of the key mappings. KeyMapper allows clients to determine which host would be chosen to serve a request for a specific key without requiring a request for the key to be fully constructed. This allows clients to map a set of keys across the hosts in the D2 cluster. The client can use this information to construct a single batch request to each host, containing the group of keys which map to the respective host. Clients should not depend on a KeyMapper if strict partitioning is required.
@author Josh Walker
@version $Revision: $
KeyMapper is the simple two-way map for generating textual keys for objects and retrieving the objects later with the key.
@author IT Mill Ltd.
@version 6.7.1
@since 3.0
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.