org.apache.cassandra.client
Class RingCache
java.lang.Object
org.apache.cassandra.client.RingCache
public class RingCache
- extends java.lang.Object
A class for caching the ring map at the client. For usage example, see
test/unit/org.apache.cassandra.client.TestRingCache.java.
TODO: doing a naive linear search of the token map
Constructor Summary |
RingCache(java.lang.String keyspace,
IPartitioner partitioner,
java.lang.String addresses,
int port)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RingCache
public RingCache(java.lang.String keyspace,
IPartitioner partitioner,
java.lang.String addresses,
int port)
throws java.io.IOException
- Throws:
java.io.IOException
refreshEndpointMap
public void refreshEndpointMap()
getEndpoint
public java.util.List<java.net.InetAddress> getEndpoint(Range range)
- ListMultimap promises to return a List for get(K)
getEndpoint
public java.util.List<java.net.InetAddress> getEndpoint(java.nio.ByteBuffer key)
getRange
public Range getRange(java.nio.ByteBuffer key)
Copyright © 2010 The Apache Software Foundation