
class MemcacheClientWrapper extends AbstractMemcacheClientWrapper
| Constructor and Description |
|---|
MemcacheClientWrapper(net.spy.memcached.MemcachedClientIF memcachedClient) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(String key,
int exp,
Object value) |
<T> boolean |
add(String key,
int exp,
T value,
CacheTranscoder transcoder) |
long |
decr(String key,
int by) |
long |
decr(String key,
int by,
long def) |
boolean |
delete(String key)
Deletes value under given key.
|
void |
flush()
Flushes all data.
|
Object |
get(String key)
Get value by key.
|
<T> T |
get(String key,
CacheTranscoder transcoder)
Get value by key.
|
<T> T |
get(String key,
CacheTranscoder transcoder,
long timeout)
Get value by key.
|
Collection<SocketAddress> |
getAvailableServers()
Gets available cache servers.
|
Map<String,Object> |
getBulk(Collection<String> keys) |
<T> Map<String,T> |
getBulk(Collection<String> keys,
CacheTranscoder transcoder) |
Object |
getNativeClient()
Expose native memcached client.
|
CacheTranscoder |
getTranscoder()
Gets default transcoder.
|
long |
incr(String key,
int by) |
long |
incr(String key,
int by,
long def) |
long |
incr(String key,
int by,
long def,
int expiration) |
boolean |
set(String key,
int exp,
Object value) |
<T> boolean |
set(String key,
int exp,
T value,
CacheTranscoder transcoder)
Store key-value item to memcached.
|
void |
shutdown()
Shutdowns memcached client.
|
deleteMemcacheClientWrapper(net.spy.memcached.MemcachedClientIF memcachedClient)
public boolean add(String key, int exp, Object value) throws TimeoutException, CacheException
TimeoutExceptionCacheExceptionpublic <T> boolean add(String key, int exp, T value, CacheTranscoder transcoder) throws TimeoutException, CacheException
TimeoutExceptionCacheExceptionpublic long decr(String key, int by) throws TimeoutException, CacheException
TimeoutExceptionCacheExceptionpublic long decr(String key, int by, long def) throws TimeoutException, CacheException
TimeoutExceptionCacheExceptionpublic boolean delete(String key) throws TimeoutException, CacheException
CacheClientkey - the keyTimeoutExceptionCacheExceptionpublic void flush()
throws CacheException
CacheClientCacheExceptionpublic Object get(String key) throws TimeoutException, CacheException
CacheClientkey - the keyTimeoutExceptionCacheExceptionpublic <T> T get(String key, CacheTranscoder transcoder) throws CacheException, TimeoutException
CacheClientkey - the keytranscoder - the transcoder to useCacheExceptionTimeoutExceptionpublic <T> T get(String key, CacheTranscoder transcoder, long timeout) throws TimeoutException, CacheException
CacheClientkey - the keytranscoder - the transcoder to usetimeout - the timeout, if the method is not returned in this time, throws TimeoutExceptionTimeoutExceptionCacheExceptionpublic Collection<SocketAddress> getAvailableServers()
CacheClientpublic Map<String,Object> getBulk(Collection<String> keys) throws TimeoutException, CacheException
TimeoutExceptionCacheExceptionpublic <T> Map<String,T> getBulk(Collection<String> keys, CacheTranscoder transcoder) throws TimeoutException, CacheException
TimeoutExceptionCacheExceptionpublic long incr(String key, int by) throws TimeoutException, CacheException
TimeoutExceptionCacheExceptionpublic long incr(String key, int by, long def) throws TimeoutException, CacheException
TimeoutExceptionCacheExceptionpublic long incr(String key, int by, long def, int expiration) throws TimeoutException, CacheException
TimeoutExceptionCacheExceptionpublic boolean set(String key, int exp, Object value) throws TimeoutException, CacheException
TimeoutExceptionCacheExceptionpublic <T> boolean set(String key, int exp, T value, CacheTranscoder transcoder) throws TimeoutException, CacheException
CacheClientkey - stored keyexp - expire timevalue - stored datatranscoder - the transcoder to useTimeoutExceptionCacheExceptionpublic void shutdown()
CacheClientpublic CacheTranscoder getTranscoder()
CacheClientpublic Object getNativeClient()
CacheClientCopyright © 2019. All rights reserved.