net.spy.memcached
Interface MemcachedClientIF
- All Known Implementing Classes: 
 - MemcachedClient
 
public interface MemcachedClientIF
This interface is provided as a helper for testing clients of the MemcachedClient.
 
| 
Method Summary | 
 Future<Boolean> | 
add(String key,
    int exp,
    Object o)
 
            | 
 | 
add(String key,
    int exp,
    T o,
    Transcoder<T> tc)
 
            | 
 boolean | 
addObserver(ConnectionObserver obs)
 
            | 
 Future<Boolean> | 
append(long cas,
       String key,
       Object val)
 
            | 
 | 
append(long cas,
       String key,
       T val,
       Transcoder<T> tc)
 
            | 
 Future<CASResponse> | 
asyncCAS(String key,
         long casId,
         Object value)
 
            | 
 | 
asyncCAS(String key,
         long casId,
         T value,
         Transcoder<T> tc)
 
            | 
 Future<Long> | 
asyncDecr(String key,
          int by)
 
            | 
 Future<Object> | 
asyncGet(String key)
 
            | 
 | 
asyncGet(String key,
         Transcoder<T> tc)
 
            | 
 Future<Map<String,Object>> | 
asyncGetBulk(Collection<String> keys)
 
            | 
 | 
asyncGetBulk(Collection<String> keys,
             Transcoder<T> tc)
 
            | 
 Future<Map<String,Object>> | 
asyncGetBulk(String... keys)
 
            | 
 | 
asyncGetBulk(Transcoder<T> tc,
             String... keys)
 
            | 
 Future<CASValue<Object>> | 
asyncGets(String key)
 
            | 
 | 
asyncGets(String key,
          Transcoder<T> tc)
 
            | 
 Future<Long> | 
asyncIncr(String key,
          int by)
 
            | 
 CASResponse | 
cas(String key,
    long casId,
    Object value)
 
            | 
 | 
cas(String key,
    long casId,
    T value,
    Transcoder<T> tc)
 
            | 
 long | 
decr(String key,
     int by)
 
            | 
 long | 
decr(String key,
     int by,
     long def)
 
            | 
 long | 
decr(String key,
     int by,
     long def,
     int exp)
 
            | 
 Future<Boolean> | 
delete(String key)
 
            | 
 Future<Boolean> | 
flush()
 
            | 
 Future<Boolean> | 
flush(int delay)
 
            | 
 Object | 
get(String key)
 
            | 
 | 
get(String key,
    Transcoder<T> tc)
 
            | 
 Collection<SocketAddress> | 
getAvailableServers()
 
            | 
 Map<String,Object> | 
getBulk(Collection<String> keys)
 
            | 
 | 
getBulk(Collection<String> keys,
        Transcoder<T> tc)
 
            | 
 Map<String,Object> | 
getBulk(String... keys)
 
            | 
 | 
getBulk(Transcoder<T> tc,
        String... keys)
 
            | 
 NodeLocator | 
getNodeLocator()
 
            | 
 CASValue<Object> | 
gets(String key)
 
            | 
 | 
gets(String key,
     Transcoder<T> tc)
 
            | 
 Map<SocketAddress,Map<String,String>> | 
getStats()
 
            | 
 Map<SocketAddress,Map<String,String>> | 
getStats(String prefix)
 
            | 
 Transcoder<Object> | 
getTranscoder()
 
            | 
 Collection<SocketAddress> | 
getUnavailableServers()
 
            | 
 Map<SocketAddress,String> | 
getVersions()
 
            | 
 long | 
incr(String key,
     int by)
 
            | 
 long | 
incr(String key,
     int by,
     long def)
 
            | 
 long | 
incr(String key,
     int by,
     long def,
     int exp)
 
            | 
 Future<Boolean> | 
prepend(long cas,
        String key,
        Object val)
 
            | 
 | 
prepend(long cas,
        String key,
        T val,
        Transcoder<T> tc)
 
            | 
 boolean | 
removeObserver(ConnectionObserver obs)
 
            | 
 Future<Boolean> | 
replace(String key,
        int exp,
        Object o)
 
            | 
 | 
replace(String key,
        int exp,
        T o,
        Transcoder<T> tc)
 
            | 
 Future<Boolean> | 
set(String key,
    int exp,
    Object o)
 
            | 
 | 
set(String key,
    int exp,
    T o,
    Transcoder<T> tc)
 
            | 
 void | 
shutdown()
 
            | 
 boolean | 
shutdown(long timeout,
         TimeUnit unit)
 
            | 
 boolean | 
waitForQueues(long timeout,
              TimeUnit unit)
 
            | 
 
MAX_KEY_LENGTH
static final int MAX_KEY_LENGTH
- Maximum supported key length.
- See Also:
 - Constant Field Values
 
 
getAvailableServers
Collection<SocketAddress> getAvailableServers()
 
getUnavailableServers
Collection<SocketAddress> getUnavailableServers()
 
getTranscoder
Transcoder<Object> getTranscoder()
 
getNodeLocator
NodeLocator getNodeLocator()
 
append
Future<Boolean> append(long cas,
                       String key,
                       Object val)
 
append
<T> Future<Boolean> append(long cas,
                           String key,
                           T val,
                           Transcoder<T> tc)
 
prepend
Future<Boolean> prepend(long cas,
                        String key,
                        Object val)
 
prepend
<T> Future<Boolean> prepend(long cas,
                            String key,
                            T val,
                            Transcoder<T> tc)
 
asyncCAS
<T> Future<CASResponse> asyncCAS(String key,
                                 long casId,
                                 T value,
                                 Transcoder<T> tc)
 
asyncCAS
Future<CASResponse> asyncCAS(String key,
                             long casId,
                             Object value)
 
cas
<T> CASResponse cas(String key,
                    long casId,
                    T value,
                    Transcoder<T> tc)
                throws OperationTimeoutException
- Throws:
 OperationTimeoutException
 
cas
CASResponse cas(String key,
                long casId,
                Object value)
                throws OperationTimeoutException
- Throws:
 OperationTimeoutException
 
add
<T> Future<Boolean> add(String key,
                        int exp,
                        T o,
                        Transcoder<T> tc)
 
add
Future<Boolean> add(String key,
                    int exp,
                    Object o)
 
set
<T> Future<Boolean> set(String key,
                        int exp,
                        T o,
                        Transcoder<T> tc)
 
set
Future<Boolean> set(String key,
                    int exp,
                    Object o)
 
replace
<T> Future<Boolean> replace(String key,
                            int exp,
                            T o,
                            Transcoder<T> tc)
 
replace
Future<Boolean> replace(String key,
                        int exp,
                        Object o)
 
asyncGet
<T> Future<T> asyncGet(String key,
                       Transcoder<T> tc)
 
asyncGet
Future<Object> asyncGet(String key)
 
asyncGets
<T> Future<CASValue<T>> asyncGets(String key,
                                  Transcoder<T> tc)
 
asyncGets
Future<CASValue<Object>> asyncGets(String key)
 
gets
<T> CASValue<T> gets(String key,
                     Transcoder<T> tc)
                 throws OperationTimeoutException
- Throws:
 OperationTimeoutException
 
gets
CASValue<Object> gets(String key)
                      throws OperationTimeoutException
- Throws:
 OperationTimeoutException
 
get
<T> T get(String key,
          Transcoder<T> tc)
      throws OperationTimeoutException
- Throws:
 OperationTimeoutException
 
get
Object get(String key)
           throws OperationTimeoutException
- Throws:
 OperationTimeoutException
 
asyncGetBulk
<T> Future<Map<String,T>> asyncGetBulk(Collection<String> keys,
                                       Transcoder<T> tc)
 
asyncGetBulk
Future<Map<String,Object>> asyncGetBulk(Collection<String> keys)
 
asyncGetBulk
<T> Future<Map<String,T>> asyncGetBulk(Transcoder<T> tc,
                                       String... keys)
 
asyncGetBulk
Future<Map<String,Object>> asyncGetBulk(String... keys)
 
getBulk
<T> Map<String,T> getBulk(Collection<String> keys,
                          Transcoder<T> tc)
                      throws OperationTimeoutException
- Throws:
 OperationTimeoutException
 
getBulk
Map<String,Object> getBulk(Collection<String> keys)
                           throws OperationTimeoutException
- Throws:
 OperationTimeoutException
 
getBulk
<T> Map<String,T> getBulk(Transcoder<T> tc,
                          String... keys)
                      throws OperationTimeoutException
- Throws:
 OperationTimeoutException
 
getBulk
Map<String,Object> getBulk(String... keys)
                           throws OperationTimeoutException
- Throws:
 OperationTimeoutException
 
getVersions
Map<SocketAddress,String> getVersions()
 
getStats
Map<SocketAddress,Map<String,String>> getStats()
 
getStats
Map<SocketAddress,Map<String,String>> getStats(String prefix)
 
incr
long incr(String key,
          int by)
          throws OperationTimeoutException
- Throws:
 OperationTimeoutException
 
decr
long decr(String key,
          int by)
          throws OperationTimeoutException
- Throws:
 OperationTimeoutException
 
incr
long incr(String key,
          int by,
          long def,
          int exp)
          throws OperationTimeoutException
- Throws:
 OperationTimeoutException
 
decr
long decr(String key,
          int by,
          long def,
          int exp)
          throws OperationTimeoutException
- Throws:
 OperationTimeoutException
 
asyncIncr
Future<Long> asyncIncr(String key,
                       int by)
 
asyncDecr
Future<Long> asyncDecr(String key,
                       int by)
 
incr
long incr(String key,
          int by,
          long def)
          throws OperationTimeoutException
- Throws:
 OperationTimeoutException
 
decr
long decr(String key,
          int by,
          long def)
          throws OperationTimeoutException
- Throws:
 OperationTimeoutException
 
delete
Future<Boolean> delete(String key)
 
flush
Future<Boolean> flush(int delay)
 
flush
Future<Boolean> flush()
 
shutdown
void shutdown()
 
shutdown
boolean shutdown(long timeout,
                 TimeUnit unit)
 
waitForQueues
boolean waitForQueues(long timeout,
                      TimeUnit unit)
 
addObserver
boolean addObserver(ConnectionObserver obs)
 
removeObserver
boolean removeObserver(ConnectionObserver obs)