|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.m3.memcached.facade.MemcachedClient
public class MemcachedClient
Memcached Client Facade
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_NAMESPACE
Default namespace |
| Method Summary | ||
|---|---|---|
void |
delete(java.lang.String key)
Delete key from memcached servers |
|
|
get(java.lang.String key)
Returns cached value or null |
|
ClientImpl |
getClientImpl()
Returns ClientImpl instance |
|
void |
initialize(java.util.List<java.net.InetSocketAddress> addresses)
Initializes memcached client with default namespace (connecting to the memcached servers and so on.) |
|
void |
initialize(java.util.List<java.net.InetSocketAddress> addresses,
java.lang.String namespace)
Initializes memcached client with namespace (connecting to the memcached servers and so on.) |
|
|
set(java.lang.String key,
int secondsToExpire,
T value)
Set value to memcached servers |
|
|
setAndEnsure(java.lang.String key,
int secondsToExpire,
T value)
Set value to memcached servers and ensure completion |
|
void |
shutdown()
Shutdown client instance. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_NAMESPACE
| Method Detail |
|---|
public void initialize(java.util.List<java.net.InetSocketAddress> addresses)
throws java.io.IOException
addresses - server addresses
java.io.IOException - when failed initializing
public void initialize(java.util.List<java.net.InetSocketAddress> addresses,
java.lang.String namespace)
throws java.io.IOException
addresses - server addressesnamespace - key namespace
java.io.IOException - when failed initializing
public <T> T get(java.lang.String key)
throws java.io.IOException
T - value typekey - cache key
java.io.IOException - when failed accessing servers
public <T> void set(java.lang.String key,
int secondsToExpire,
T value)
throws java.io.IOException
T - value typekey - cache keysecondsToExpire - seconds to expirevalue - value
java.io.IOException - when failed accessing servers or putting value
public <T> void setAndEnsure(java.lang.String key,
int secondsToExpire,
T value)
throws java.io.IOException
T - value typekey - cache keysecondsToExpire - seconds to expirevalue - value
java.io.IOException - when failed accessing servers or putting value
public void delete(java.lang.String key)
throws java.io.IOException
key - key
java.io.IOException - when failed accessing servers or putting valuepublic void shutdown()
public ClientImpl getClientImpl()
ClientImpl instance
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||