net.rubyeye.xmemcached
类 XMemcachedClient

java.lang.Object
  继承者 net.rubyeye.xmemcached.XMemcachedClient
所有已实现的接口:
MemcachedClient, XMemcachedClientMBean

public class XMemcachedClient
extends Object
implements XMemcachedClientMBean, MemcachedClient

Memcached Client for connecting to memcached server and do operations.

作者:
dennis(killme2008@gmail.com)

字段摘要
protected  CommandFactory commandFactory
           
protected  int connectionPoolSize
           
protected  MemcachedConnector connector
           
protected  int maxQueuedNoReplyOperations
           
protected  AtomicInteger serverOrderCount
           
protected  MemcachedSessionLocator sessionLocator
           
 
从接口 net.rubyeye.xmemcached.MemcachedClient 继承的字段
DEFAULT_CONNECT_TIMEOUT, DEFAULT_CONNECTION_POOL_SIZE, DEFAULT_HEAL_SESSION_INTERVAL, DEFAULT_MAX_QUEUED_NOPS, DEFAULT_MAX_TIMEOUTEXCEPTION_THRESHOLD, DEFAULT_OP_TIMEOUT, DEFAULT_READ_THREAD_COUNT, DEFAULT_SESSION_IDLE_TIMEOUT, DEFAULT_SESSION_READ_BUFF_SIZE, DEFAULT_TCP_KEEPLIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_TCP_RECV_BUFF_SIZE, DEFAULT_TCP_SEND_BUFF_SIZE, DYNAMIC_MAX_QUEUED_NOPS, MAX_QUEUED_NOPS
 
构造方法摘要
XMemcachedClient()
           
XMemcachedClient(InetSocketAddress inetSocketAddress)
           
XMemcachedClient(InetSocketAddress inetSocketAddress, int weight)
          XMemcached Constructor.
XMemcachedClient(List<InetSocketAddress> addressList)
          XMemcached Constructor.Every server's weight is one by default.
XMemcachedClient(String server, int port)
          XMemcached constructor,default weight is 1
XMemcachedClient(String host, int port, int weight)
          XMemcached constructor
 
方法摘要
 boolean add(String key, int exp, Object value)
           
 boolean add(String key, int exp, Object value, long timeout)
           
<T> boolean
add(String key, int exp, T value, Transcoder<T> transcoder)
           
<T> boolean
add(String key, int exp, T value, Transcoder<T> transcoder, long timeout)
          Add key-value item to memcached, success only when the key is not exists in memcached.
 void addOneServerWithWeight(String server, int weight)
          Add a memcached server
 void addServer(InetSocketAddress inetSocketAddress)
          Add a memcached server,the thread call this method will be blocked until the connecting operations completed(success or fail)
 void addServer(InetSocketAddress inetSocketAddress, int weight)
           
 void addServer(String hostList)
          Add memcached servers
 void addServer(String server, int port)
          Aadd a memcached server,the thread call this method will be blocked until the connecting operations completed(success or fail)
 void addServer(String server, int port, int weight)
          add a memcached server to MemcachedClient
 void addStateListener(MemcachedClientStateListener listener)
          Add a memcached client listener
 void addWithNoReply(String key, int exp, Object value)
          Add key-value item to memcached, success only when the key is not exists in memcached.This method doesn't wait for reply.
<T> void
addWithNoReply(String key, int exp, T value, Transcoder<T> transcoder)
           
 boolean append(String key, Object value)
           
 boolean append(String key, Object value, long timeout)
          Append value to key's data item,this method will wait for reply
 void appendWithNoReply(String key, Object value)
          Append value to key's data item,this method doesn't wait for reply.
<T> boolean
cas(String key, CASOperation<T> operation)
           
<T> boolean
cas(String key, GetsResponse<T> getsReponse, CASOperation<T> operation)
           
<T> boolean
cas(String key, int exp, CASOperation<T> operation)
           
<T> boolean
cas(String key, int exp, CASOperation<T> operation, Transcoder<T> transcoder)
          Cas is a check and set operation which means "store this data but only if no one else has updated since I last fetched it."
<T> boolean
cas(String key, int exp, GetsResponse<T> getsReponse, CASOperation<T> operation)
           
<T> boolean
cas(String key, int exp, GetsResponse<T> getsReponse, CASOperation<T> operation, Transcoder<T> transcoder)
          cas is a check and set operation which means "store this data but only if no one else has updated since I last fetched it."
 boolean cas(String key, int exp, Object value, long cas)
           
 boolean cas(String key, int exp, Object value, long timeout, long cas)
           
<T> boolean
cas(String key, int exp, T value, Transcoder<T> transcoder, long cas)
           
<T> boolean
cas(String key, int exp, T value, Transcoder<T> transcoder, long timeout, long cas)
          Cas is a check and set operation which means "store this data but only if no one else has updated since I last fetched it."
<T> void
casWithNoReply(String key, CASOperation<T> operation)
           
<T> void
casWithNoReply(String key, GetsResponse<T> getsResponse, CASOperation<T> operation)
           
<T> void
casWithNoReply(String key, int exp, CASOperation<T> operation)
           
<T> void
casWithNoReply(String key, int exp, GetsResponse<T> getsReponse, CASOperation<T> operation)
          cas noreply
protected  void checkSocketAddress(InetSocketAddress address)
           
 long decr(String key, long delta)
          "decr" are used to change data for some item in-place, decrementing it.
 long decr(String key, long delta, long initValue)
           
 long decr(String key, long delta, long initValue, long timeout)
          "decr" are used to change data for some item in-place, decrementing it.
 long decr(String key, long delta, long initValue, long timeout, int exp)
          "incr" are used to change data for some item in-place, incrementing it.
 void decrWithNoReply(String key, long delta)
          "decr" are used to change data for some item in-place, decrementing it.
 boolean delete(String key)
           
 boolean delete(String key, int time)
          Delete key's data item from memcached.It it is not exists,return false.
 boolean delete(String key, long opTimeout)
          Delete key's date item from memcached
 void deleteWithNoReply(String key)
           
 void deleteWithNoReply(String key, int time)
          Delete key's data item from memcached.This method doesn't wait for reply
 void flushAll()
          Make All connected memcached's data item invalid
 void flushAll(InetSocketAddress address)
          Invalidate all existing items immediately
 void flushAll(InetSocketAddress address, long timeout)
           
 void flushAll(InetSocketAddress address, long timeout, int exptime)
           
 void flushAll(int exptime, long timeout)
           
 void flushAll(long timeout)
          Make All connected memcached's data item invalid
 void flushAll(String host)
          This method is deprecated,please use flushAll(InetSocketAddress) instead.
 void flushAllWithNoReply()
           
 void flushAllWithNoReply(InetSocketAddress address)
           
 void flushAllWithNoReply(InetSocketAddress address, int exptime)
           
 void flushAllWithNoReply(int exptime)
           
<T> Map<String,T>
get(Collection<String> keyCollections)
           
<T> Map<String,T>
get(Collection<String> keyCollections, long timeout)
           
<T> Map<String,T>
get(Collection<String> keyCollections, long timeout, Transcoder<T> transcoder)
          Bulk get items
<T> Map<String,T>
get(Collection<String> keyCollections, Transcoder<T> transcoder)
           
<T> T
get(String key)
           
<T> T
get(String key, long timeout)
           
<T> T
get(String key, long timeout, Transcoder<T> transcoder)
          Get value by key
<T> T
get(String key, Transcoder<T> transcoder)
           
<T> T
getAndTouch(String key, int newExp)
          Get item and set a new expiration time for it,using default opTimeout
<T> T
getAndTouch(String key, int newExp, long opTimeout)
          Get item and set a new expiration time for it
 Map<InetSocketAddress,AuthInfo> getAuthInfoMap()
          return current all auth info
 Collection<InetSocketAddress> getAvailableServers()
          Returns available memcached servers list.
 Collection<InetSocketAddress> getAvaliableServers()
          已过时。  
 CommandFactory getCommandFactory()
           
 int getConnectionSizeBySocketAddress(InetSocketAddress address)
           
 Connector getConnector()
          return the session manager
 long getConnectTimeout()
          Get the connect timeout
 Counter getCounter(String key)
          Get counter for key,and if the key's value is not set,then set it with 0.
 Counter getCounter(String key, long initialValue)
          Get counter for key,and if the key's value is not set,then set it with initial value.
 long getHealSessionInterval()
          Return the default heal session interval in milliseconds
 KeyIterator getKeyIterator(InetSocketAddress address)
          已过时。 memcached 1.6.x will remove cachedump stats command,so this method will be removed in the future
 KeyProvider getKeyProvider()
           
 String getName()
          Return the cache instance name
 long getOpTimeout()
          get operation timeout setting
 Protocol getProtocol()
           
 Queue<ReconnectRequest> getReconnectRequestQueue()
          Returns reconnecting task queue,the queue is thread-safe and 'weakly consistent',but maybe you should not modify it at all.
<T> Map<String,GetsResponse<T>>
gets(Collection<String> keyCollections)
           
<T> Map<String,GetsResponse<T>>
gets(Collection<String> keyCollections, long timeout)
           
<T> Map<String,GetsResponse<T>>
gets(Collection<String> keyCollections, long timeout, Transcoder<T> transcoder)
          Bulk gets items
<T> Map<String,GetsResponse<T>>
gets(Collection<String> keyCollections, Transcoder<T> transcoder)
           
<T> GetsResponse<T>
gets(String key)
           
<T> GetsResponse<T>
gets(String key, long timeout)
           
<T> GetsResponse<T>
gets(String key, long timeout, Transcoder<T> transcoder)
          Just like get,But it return a GetsResponse,include cas value for cas update.
<T> GetsResponse<T>
gets(String key, Transcoder transcoder)
           
 List<String> getServersDescription()
          Get all connected memcached servers
 MemcachedSessionLocator getSessionLocator()
           
 Collection<MemcachedClientStateListener> getStateListeners()
          Get all current state listeners
 Map<InetSocketAddress,Map<String,String>> getStats()
           
 Map<InetSocketAddress,Map<String,String>> getStats(long timeout)
          Get stats from all memcached servers
 Map<InetSocketAddress,Map<String,String>> getStatsByItem(String itemName)
          Get special item stats.
 Map<InetSocketAddress,Map<String,String>> getStatsByItem(String itemName, long timeout)
           
 int getTimeoutExceptionThreshold()
          Returns maximum number of timeout exception for closing connection.
 Transcoder getTranscoder()
          return default transcoder,default is SerializingTranscoder
 Map<InetSocketAddress,String> getVersions()
          Get all connected memcached servers's version.
 Map<InetSocketAddress,String> getVersions(long timeout)
           
 long incr(String key, long delta)
          "incr" are used to change data for some item in-place, incrementing it.
 long incr(String key, long delta, long initValue)
           
 long incr(String key, long delta, long initValue, long timeout)
          "incr" are used to change data for some item in-place, incrementing it.
 long incr(String key, long delta, long initValue, long timeout, int exp)
          "incr" are used to change data for some item in-place, incrementing it.
 void incrWithNoReply(String key, long delta)
          "incr" are used to change data for some item in-place, incrementing it.
 boolean isFailureMode()
          Returns if client is in failure mode.
 boolean isSanitizeKeys()
           
 boolean isShutdown()
           
protected  MemcachedConnector newConnector(BufferAllocator bufferAllocator, Configuration configuration, MemcachedSessionLocator memcachedSessionLocator, CommandFactory commandFactory, int poolSize, int maxQueuedNoReplyOperations)
           
protected  InetSocketAddress newSocketAddress(String server, int port)
           
 boolean prepend(String key, Object value)
           
 boolean prepend(String key, Object value, long timeout)
          Prepend value to key's data item in memcached.This method doesn't wait for reply.
 void prependWithNoReply(String key, Object value)
          Prepend value to key's data item in memcached.This method doesn't wait for reply.
 void removeServer(String hostList)
          Remove memcached servers
 void removeStateListener(MemcachedClientStateListener listener)
          Remove a memcached client listener
 boolean replace(String key, int exp, Object value)
           
 boolean replace(String key, int exp, Object value, long timeout)
           
<T> boolean
replace(String key, int exp, T value, Transcoder<T> transcoder)
           
<T> boolean
replace(String key, int exp, T value, Transcoder<T> transcoder, long timeout)
          Replace the key's data item in memcached,success only when the key's data item is exists in memcached.This method will wait for reply from server.
 void replaceWithNoReply(String key, int exp, Object value)
          Replace the key's data item in memcached,success only when the key's data item is exists in memcached.This method doesn't wait for reply from server.
<T> void
replaceWithNoReply(String key, int exp, T value, Transcoder<T> transcoder)
           
 boolean set(String key, int exp, Object value)
           
 boolean set(String key, int exp, Object value, long timeout)
           
<T> boolean
set(String key, int exp, T value, Transcoder<T> transcoder)
           
<T> boolean
set(String key, int exp, T value, Transcoder<T> transcoder, long timeout)
          Store key-value item to memcached
 void setAuthInfoMap(Map<InetSocketAddress,AuthInfo> map)
          Configure auth info
 void setBufferAllocator(BufferAllocator bufferAllocator)
          Set the nio's ByteBuffer Allocator,use SimpleBufferAllocator by default.
 void setConnectionPoolSize(int poolSize)
          In a high concurrent enviroment,you may want to pool memcached clients.But a xmemcached client has to start a reactor thread and some thread pools,if you create too many clients,the cost is very large.
 void setConnectTimeout(long connectTimeout)
          Set the connect timeout,default is 1 minutes
 void setEnableHealSession(boolean enableHealSession)
          If the memcached dump or network error cause connection closed,xmemcached would try to heal the connection.You can disable this behaviour by using this method:
client.setEnableHealSession(false);
The default value is true.
 void setEnableHeartBeat(boolean enableHeartBeat)
          Whether to enable heart beat
 void setFailureMode(boolean failureMode)
          Configure wheather to set client in failure mode.If set it to true,that means you want to configure client in failure mode.
 void setHealSessionInterval(long healConnectionInterval)
          If the memcached dump or network error cause connection closed,xmemcached would try to heal the connection.The interval between reconnections is 2 seconds by default.
 void setKeyProvider(KeyProvider keyProvider)
          Set a key provider for pre-processing keys before sending them to memcached.
 void setLoggingLevelVerbosity(InetSocketAddress address, int level)
          Set the verbosity level of the memcached's logging output.This method will wait for reply.
 void setLoggingLevelVerbosityWithNoReply(InetSocketAddress address, int level)
          Set the verbosity level of the memcached's logging output.This method doesn't wait for reply from server
 void setMergeFactor(int mergeFactor)
          Set the merge factor,this factor determins how many 'get' commands would be merge to one multi-get command.default is 150
 void setName(String name)
          Set cache instance name
 void setOpTimeout(long opTimeout)
          set operation timeout,default is one second.
 void setOptimizeGet(boolean optimizeGet)
          Enable/Disable merge many get commands to one multi-get command.true is to enable it,false is to disable it.Default is true.Recommend users to enable it.
 void setOptimizeMergeBuffer(boolean optimizeMergeBuffer)
          Enable/Disable merge many command's buffers to one big buffer fit socket's send buffer size.Default is true.Recommend true.
 void setPrimitiveAsString(boolean primitiveAsString)
          Store all primitive type as string,defualt is false.
 void setSanitizeKeys(boolean sanitizeKeys)
          Enables/disables sanitizing keys by URLEncoding.
 void setServerWeight(String server, int weight)
          Set a memcached server's weight
 void setTimeoutExceptionThreshold(int timeoutExceptionThreshold)
          Set maximum number of timeout exception for closing connection.You can set it to be a large value to disable this feature.
 void setTranscoder(Transcoder transcoder)
          set transcoder
 void setWithNoReply(String key, int exp, Object value)
          Store key-value item to memcached,doesn't wait for reply
<T> void
setWithNoReply(String key, int exp, T value, Transcoder<T> transcoder)
           
 void shutdown()
           
 Map<String,String> stats(InetSocketAddress address)
           
 Map<String,String> stats(InetSocketAddress address, long timeout)
          �ョ��瑰������emcached server缁��淇℃�
 boolean touch(String key, int exp)
          Set a new expiration time for an existing item,using default opTimeout second.
 boolean touch(String key, int exp, long opTimeout)
          Set a new expiration time for an existing item
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

sessionLocator

protected MemcachedSessionLocator sessionLocator

connector

protected MemcachedConnector connector

commandFactory

protected CommandFactory commandFactory

connectionPoolSize

protected int connectionPoolSize

maxQueuedNoReplyOperations

protected int maxQueuedNoReplyOperations

serverOrderCount

protected final AtomicInteger serverOrderCount
构造方法详细信息

XMemcachedClient

public XMemcachedClient(String server,
                        int port)
                 throws IOException
XMemcached constructor,default weight is 1

参数:
server - �����P
port - ����ㄧ���
抛出:
IOException

XMemcachedClient

public XMemcachedClient(String host,
                        int port,
                        int weight)
                 throws IOException
XMemcached constructor

参数:
host - server host
port - server port
weight - server weight
抛出:
IOException

XMemcachedClient

public XMemcachedClient(InetSocketAddress inetSocketAddress,
                        int weight)
                 throws IOException
XMemcached Constructor.

参数:
inetSocketAddress -
weight -
抛出:
IOException

XMemcachedClient

public XMemcachedClient(InetSocketAddress inetSocketAddress)
                 throws IOException
抛出:
IOException

XMemcachedClient

public XMemcachedClient()
                 throws IOException
抛出:
IOException

XMemcachedClient

public XMemcachedClient(List<InetSocketAddress> addressList)
                 throws IOException
XMemcached Constructor.Every server's weight is one by default.

参数:
addressList -
抛出:
IOException
方法详细信息

setMergeFactor

public final void setMergeFactor(int mergeFactor)
从接口 MemcachedClient 复制的描述
Set the merge factor,this factor determins how many 'get' commands would be merge to one multi-get command.default is 150

指定者:
接口 MemcachedClient 中的 setMergeFactor

getTimeoutExceptionThreshold

public int getTimeoutExceptionThreshold()
从接口 MemcachedClient 复制的描述
Returns maximum number of timeout exception for closing connection.

指定者:
接口 MemcachedClient 中的 getTimeoutExceptionThreshold
返回:

setTimeoutExceptionThreshold

public void setTimeoutExceptionThreshold(int timeoutExceptionThreshold)
从接口 MemcachedClient 复制的描述
Set maximum number of timeout exception for closing connection.You can set it to be a large value to disable this feature.

指定者:
接口 MemcachedClient 中的 setTimeoutExceptionThreshold
另请参见:
MemcachedClient.DEFAULT_MAX_TIMEOUTEXCEPTION_THRESHOLD

getKeyProvider

public KeyProvider getKeyProvider()

setKeyProvider

public void setKeyProvider(KeyProvider keyProvider)
从接口 MemcachedClient 复制的描述
Set a key provider for pre-processing keys before sending them to memcached.

指定者:
接口 MemcachedClient 中的 setKeyProvider

getSessionLocator

public final MemcachedSessionLocator getSessionLocator()

getCommandFactory

public final CommandFactory getCommandFactory()

getName

public String getName()
从接口 XMemcachedClientMBean 复制的描述
Return the cache instance name

指定者:
接口 MemcachedClient 中的 getName
指定者:
接口 XMemcachedClientMBean 中的 getName
返回:

setName

public void setName(String name)
从接口 MemcachedClient 复制的描述
Set cache instance name

指定者:
接口 MemcachedClient 中的 setName

getConnectTimeout

public long getConnectTimeout()
从接口 MemcachedClient 复制的描述
Get the connect timeout

指定者:
接口 MemcachedClient 中的 getConnectTimeout

setConnectTimeout

public void setConnectTimeout(long connectTimeout)
从接口 MemcachedClient 复制的描述
Set the connect timeout,default is 1 minutes

指定者:
接口 MemcachedClient 中的 setConnectTimeout

setEnableHeartBeat

public void setEnableHeartBeat(boolean enableHeartBeat)
从接口 MemcachedClient 复制的描述
Whether to enable heart beat

指定者:
接口 MemcachedClient 中的 setEnableHeartBeat
参数:
enableHeartBeat - if true,then enable heartbeat,true by default

getOpTimeout

public final long getOpTimeout()
get operation timeout setting

指定者:
接口 MemcachedClient 中的 getOpTimeout
返回:

setOpTimeout

public final void setOpTimeout(long opTimeout)
set operation timeout,default is one second.

指定者:
接口 MemcachedClient 中的 setOpTimeout
参数:
opTimeout -

setHealSessionInterval

public void setHealSessionInterval(long healConnectionInterval)
从接口 MemcachedClient 复制的描述
If the memcached dump or network error cause connection closed,xmemcached would try to heal the connection.The interval between reconnections is 2 seconds by default. You can change that value by this method.

指定者:
接口 MemcachedClient 中的 setHealSessionInterval
参数:
healConnectionInterval - MILLISECONDS

getHealSessionInterval

public long getHealSessionInterval()
从接口 MemcachedClient 复制的描述
Return the default heal session interval in milliseconds

指定者:
接口 MemcachedClient 中的 getHealSessionInterval
返回:

getAuthInfoMap

public Map<InetSocketAddress,AuthInfo> getAuthInfoMap()
从接口 MemcachedClient 复制的描述
return current all auth info

指定者:
接口 MemcachedClient 中的 getAuthInfoMap
返回:
Auth info map,key is memcached server address,and value is the auth info for the key.

setAuthInfoMap

public void setAuthInfoMap(Map<InetSocketAddress,AuthInfo> map)
从接口 MemcachedClient 复制的描述
Configure auth info

指定者:
接口 MemcachedClient 中的 setAuthInfoMap
参数:
map - Auth info map,key is memcached server address,and value is the auth info for the key.

getConnector

public final Connector getConnector()
从接口 MemcachedClient 复制的描述
return the session manager

指定者:
接口 MemcachedClient 中的 getConnector
返回:

setOptimizeMergeBuffer

public final void setOptimizeMergeBuffer(boolean optimizeMergeBuffer)
从接口 MemcachedClient 复制的描述
Enable/Disable merge many command's buffers to one big buffer fit socket's send buffer size.Default is true.Recommend true.

指定者:
接口 MemcachedClient 中的 setOptimizeMergeBuffer

isShutdown

public final boolean isShutdown()
指定者:
接口 MemcachedClient 中的 isShutdown
返回:

newSocketAddress

protected InetSocketAddress newSocketAddress(String server,
                                             int port)

addServer

public final void addServer(String server,
                            int port)
                     throws IOException
从接口 MemcachedClient 复制的描述
Aadd a memcached server,the thread call this method will be blocked until the connecting operations completed(success or fail)

指定者:
接口 MemcachedClient 中的 addServer
参数:
server - host string
port - port number
抛出:
IOException

addServer

public final void addServer(String server,
                            int port,
                            int weight)
                     throws IOException
add a memcached server to MemcachedClient

指定者:
接口 MemcachedClient 中的 addServer
参数:
server -
port -
weight -
抛出:
IOException

addServer

public final void addServer(InetSocketAddress inetSocketAddress)
                     throws IOException
从接口 MemcachedClient 复制的描述
Add a memcached server,the thread call this method will be blocked until the connecting operations completed(success or fail)

指定者:
接口 MemcachedClient 中的 addServer
参数:
inetSocketAddress - memcached server's socket address
抛出:
IOException

addServer

public final void addServer(InetSocketAddress inetSocketAddress,
                            int weight)
                     throws IOException
指定者:
接口 MemcachedClient 中的 addServer
抛出:
IOException

addServer

public final void addServer(String hostList)
                     throws IOException
从接口 XMemcachedClientMBean 复制的描述
Add memcached servers

指定者:
接口 MemcachedClient 中的 addServer
指定者:
接口 XMemcachedClientMBean 中的 addServer
抛出:
IOException

addOneServerWithWeight

public void addOneServerWithWeight(String server,
                                   int weight)
                            throws IOException
从接口 XMemcachedClientMBean 复制的描述
Add a memcached server

指定者:
接口 XMemcachedClientMBean 中的 addOneServerWithWeight
参数:
server - a String in the form of "[host1]:[port1],[host2]:[port2]"
weight - server's weight
抛出:
IOException

getServersDescription

public final List<String> getServersDescription()
从接口 XMemcachedClientMBean 复制的描述
Get all connected memcached servers

指定者:
接口 MemcachedClient 中的 getServersDescription
指定者:
接口 XMemcachedClientMBean 中的 getServersDescription
返回:
a list of string,every string is in the form of "[host1]:[port1](weight=num1) [host2]:[port2](weight=num1)"

setServerWeight

public final void setServerWeight(String server,
                                  int weight)
从接口 XMemcachedClientMBean 复制的描述
Set a memcached server's weight

指定者:
接口 XMemcachedClientMBean 中的 setServerWeight

removeServer

public final void removeServer(String hostList)
从接口 XMemcachedClientMBean 复制的描述
Remove memcached servers

指定者:
接口 MemcachedClient 中的 removeServer
指定者:
接口 XMemcachedClientMBean 中的 removeServer

checkSocketAddress

protected void checkSocketAddress(InetSocketAddress address)

newConnector

protected MemcachedConnector newConnector(BufferAllocator bufferAllocator,
                                          Configuration configuration,
                                          MemcachedSessionLocator memcachedSessionLocator,
                                          CommandFactory commandFactory,
                                          int poolSize,
                                          int maxQueuedNoReplyOperations)

setOptimizeGet

public void setOptimizeGet(boolean optimizeGet)
从接口 MemcachedClient 复制的描述
Enable/Disable merge many get commands to one multi-get command.true is to enable it,false is to disable it.Default is true.Recommend users to enable it.

指定者:
接口 MemcachedClient 中的 setOptimizeGet

setBufferAllocator

public final void setBufferAllocator(BufferAllocator bufferAllocator)
从接口 MemcachedClient 复制的描述
Set the nio's ByteBuffer Allocator,use SimpleBufferAllocator by default.

指定者:
接口 MemcachedClient 中的 setBufferAllocator

get

public final <T> T get(String key,
                       long timeout,
                       Transcoder<T> transcoder)
            throws TimeoutException,
                   InterruptedException,
                   MemcachedException
从接口 MemcachedClient 复制的描述
Get value by key

指定者:
接口 MemcachedClient 中的 get
参数:
key - Key
timeout - Operation timeout,if the method is not returned in this time,throw TimeoutException
transcoder - The value's transcoder
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException

get

public final <T> T get(String key,
                       long timeout)
            throws TimeoutException,
                   InterruptedException,
                   MemcachedException
指定者:
接口 MemcachedClient 中的 get
抛出:
TimeoutException
InterruptedException
MemcachedException

get

public final <T> T get(String key,
                       Transcoder<T> transcoder)
            throws TimeoutException,
                   InterruptedException,
                   MemcachedException
指定者:
接口 MemcachedClient 中的 get
抛出:
TimeoutException
InterruptedException
MemcachedException

get

public final <T> T get(String key)
            throws TimeoutException,
                   InterruptedException,
                   MemcachedException
指定者:
接口 MemcachedClient 中的 get
抛出:
TimeoutException
InterruptedException
MemcachedException

gets

public final <T> GetsResponse<T> gets(String key,
                                      long timeout,
                                      Transcoder<T> transcoder)
                           throws TimeoutException,
                                  InterruptedException,
                                  MemcachedException
从接口 MemcachedClient 复制的描述
Just like get,But it return a GetsResponse,include cas value for cas update.

指定者:
接口 MemcachedClient 中的 gets
参数:
key - key
timeout - operation timeout
返回:
GetsResponse
抛出:
TimeoutException
InterruptedException
MemcachedException

gets

public final <T> GetsResponse<T> gets(String key)
                           throws TimeoutException,
                                  InterruptedException,
                                  MemcachedException
指定者:
接口 MemcachedClient 中的 gets
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.gets(String, long, Transcoder)

gets

public final <T> GetsResponse<T> gets(String key,
                                      long timeout)
                           throws TimeoutException,
                                  InterruptedException,
                                  MemcachedException
指定者:
接口 MemcachedClient 中的 gets
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.gets(String, long, Transcoder)

gets

public final <T> GetsResponse<T> gets(String key,
                                      Transcoder transcoder)
                           throws TimeoutException,
                                  InterruptedException,
                                  MemcachedException
指定者:
接口 MemcachedClient 中的 gets
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.gets(String, long, Transcoder)

get

public final <T> Map<String,T> get(Collection<String> keyCollections,
                                   long timeout,
                                   Transcoder<T> transcoder)
                        throws TimeoutException,
                               InterruptedException,
                               MemcachedException
从接口 MemcachedClient 复制的描述
Bulk get items

指定者:
接口 MemcachedClient 中的 get
参数:
keyCollections - key collection
timeout - opTimeout
transcoder - Value transcoder
返回:
Exists items map
抛出:
TimeoutException
InterruptedException
MemcachedException

get

public final <T> Map<String,T> get(Collection<String> keyCollections,
                                   Transcoder<T> transcoder)
                        throws TimeoutException,
                               InterruptedException,
                               MemcachedException
指定者:
接口 MemcachedClient 中的 get
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.get(Collection, long, Transcoder)

get

public final <T> Map<String,T> get(Collection<String> keyCollections)
                        throws TimeoutException,
                               InterruptedException,
                               MemcachedException
指定者:
接口 MemcachedClient 中的 get
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.get(Collection, long, Transcoder)

get

public final <T> Map<String,T> get(Collection<String> keyCollections,
                                   long timeout)
                        throws TimeoutException,
                               InterruptedException,
                               MemcachedException
指定者:
接口 MemcachedClient 中的 get
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.get(Collection, long, Transcoder)

gets

public final <T> Map<String,GetsResponse<T>> gets(Collection<String> keyCollections,
                                                  long timeout,
                                                  Transcoder<T> transcoder)
                                       throws TimeoutException,
                                              InterruptedException,
                                              MemcachedException
从接口 MemcachedClient 复制的描述
Bulk gets items

指定者:
接口 MemcachedClient 中的 gets
参数:
keyCollections - key collection
timeout - Operation timeout
transcoder - Value transcoder
返回:
Exists GetsResponse map
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
GetsResponse

gets

public final <T> Map<String,GetsResponse<T>> gets(Collection<String> keyCollections)
                                       throws TimeoutException,
                                              InterruptedException,
                                              MemcachedException
指定者:
接口 MemcachedClient 中的 gets
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.gets(Collection, long, Transcoder)

gets

public final <T> Map<String,GetsResponse<T>> gets(Collection<String> keyCollections,
                                                  long timeout)
                                       throws TimeoutException,
                                              InterruptedException,
                                              MemcachedException
指定者:
接口 MemcachedClient 中的 gets
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.gets(Collection, long, Transcoder)

gets

public final <T> Map<String,GetsResponse<T>> gets(Collection<String> keyCollections,
                                                  Transcoder<T> transcoder)
                                       throws TimeoutException,
                                              InterruptedException,
                                              MemcachedException
指定者:
接口 MemcachedClient 中的 gets
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.gets(Collection, long, Transcoder)

set

public final <T> boolean set(String key,
                             int exp,
                             T value,
                             Transcoder<T> transcoder,
                             long timeout)
                  throws TimeoutException,
                         InterruptedException,
                         MemcachedException
从接口 MemcachedClient 复制的描述
Store key-value item to memcached

指定者:
接口 MemcachedClient 中的 set
参数:
key - stored key
exp - An expiration time, in seconds. Can be up to 30 days. After 30 days, is treated as a unix timestamp of an exact date.
value - stored data
transcoder - transocder
timeout - operation timeout,in milliseconds
返回:
boolean result
抛出:
TimeoutException
InterruptedException
MemcachedException

setWithNoReply

public void setWithNoReply(String key,
                           int exp,
                           Object value)
                    throws InterruptedException,
                           MemcachedException
从接口 MemcachedClient 复制的描述
Store key-value item to memcached,doesn't wait for reply

指定者:
接口 MemcachedClient 中的 setWithNoReply
参数:
key - stored key
exp - An expiration time, in seconds. Can be up to 30 days. After 30 days, is treated as a unix timestamp of an exact date.
value - stored data
抛出:
InterruptedException
MemcachedException

setWithNoReply

public <T> void setWithNoReply(String key,
                               int exp,
                               T value,
                               Transcoder<T> transcoder)
                    throws InterruptedException,
                           MemcachedException
指定者:
接口 MemcachedClient 中的 setWithNoReply
抛出:
InterruptedException
MemcachedException
另请参见:
MemcachedClient.setWithNoReply(String, int, Object, Transcoder)

set

public final boolean set(String key,
                         int exp,
                         Object value)
                  throws TimeoutException,
                         InterruptedException,
                         MemcachedException
指定者:
接口 MemcachedClient 中的 set
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.set(String, int, Object, Transcoder, long)

set

public final boolean set(String key,
                         int exp,
                         Object value,
                         long timeout)
                  throws TimeoutException,
                         InterruptedException,
                         MemcachedException
指定者:
接口 MemcachedClient 中的 set
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.set(String, int, Object, Transcoder, long)

set

public final <T> boolean set(String key,
                             int exp,
                             T value,
                             Transcoder<T> transcoder)
                  throws TimeoutException,
                         InterruptedException,
                         MemcachedException
指定者:
接口 MemcachedClient 中的 set
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.set(String, int, Object, Transcoder, long)

add

public final <T> boolean add(String key,
                             int exp,
                             T value,
                             Transcoder<T> transcoder,
                             long timeout)
                  throws TimeoutException,
                         InterruptedException,
                         MemcachedException
从接口 MemcachedClient 复制的描述
Add key-value item to memcached, success only when the key is not exists in memcached.

指定者:
接口 MemcachedClient 中的 add
exp - An expiration time, in seconds. Can be up to 30 days. After 30 days, is treated as a unix timestamp of an exact date.
返回:
boolean result
抛出:
TimeoutException
InterruptedException
MemcachedException

add

public final boolean add(String key,
                         int exp,
                         Object value)
                  throws TimeoutException,
                         InterruptedException,
                         MemcachedException
指定者:
接口 MemcachedClient 中的 add
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.add(String, int, Object, Transcoder, long)

add

public final boolean add(String key,
                         int exp,
                         Object value,
                         long timeout)
                  throws TimeoutException,
                         InterruptedException,
                         MemcachedException
指定者:
接口 MemcachedClient 中的 add
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.add(String, int, Object, Transcoder, long)

add

public final <T> boolean add(String key,
                             int exp,
                             T value,
                             Transcoder<T> transcoder)
                  throws TimeoutException,
                         InterruptedException,
                         MemcachedException
指定者:
接口 MemcachedClient 中的 add
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.add(String, int, Object, Transcoder, long)

addWithNoReply

public void addWithNoReply(String key,
                           int exp,
                           Object value)
                    throws InterruptedException,
                           MemcachedException
从接口 MemcachedClient 复制的描述
Add key-value item to memcached, success only when the key is not exists in memcached.This method doesn't wait for reply.

指定者:
接口 MemcachedClient 中的 addWithNoReply
exp - An expiration time, in seconds. Can be up to 30 days. After 30 days, is treated as a unix timestamp of an exact date.
抛出:
InterruptedException
MemcachedException

addWithNoReply

public <T> void addWithNoReply(String key,
                               int exp,
                               T value,
                               Transcoder<T> transcoder)
                    throws InterruptedException,
                           MemcachedException
指定者:
接口 MemcachedClient 中的 addWithNoReply
抛出:
InterruptedException
MemcachedException
另请参见:
MemcachedClient.addWithNoReply(String, int, Object, Transcoder)

replaceWithNoReply

public void replaceWithNoReply(String key,
                               int exp,
                               Object value)
                        throws InterruptedException,
                               MemcachedException
从接口 MemcachedClient 复制的描述
Replace the key's data item in memcached,success only when the key's data item is exists in memcached.This method doesn't wait for reply from server.

指定者:
接口 MemcachedClient 中的 replaceWithNoReply
exp - An expiration time, in seconds. Can be up to 30 days. After 30 days, is treated as a unix timestamp of an exact date.
抛出:
InterruptedException
MemcachedException

replaceWithNoReply

public <T> void replaceWithNoReply(String key,
                                   int exp,
                                   T value,
                                   Transcoder<T> transcoder)
                        throws InterruptedException,
                               MemcachedException
指定者:
接口 MemcachedClient 中的 replaceWithNoReply
抛出:
InterruptedException
MemcachedException
另请参见:
MemcachedClient.replaceWithNoReply(String, int, Object, Transcoder)

replace

public final <T> boolean replace(String key,
                                 int exp,
                                 T value,
                                 Transcoder<T> transcoder,
                                 long timeout)
                      throws TimeoutException,
                             InterruptedException,
                             MemcachedException
从接口 MemcachedClient 复制的描述
Replace the key's data item in memcached,success only when the key's data item is exists in memcached.This method will wait for reply from server.

指定者:
接口 MemcachedClient 中的 replace
exp - An expiration time, in seconds. Can be up to 30 days. After 30 days, is treated as a unix timestamp of an exact date.
返回:
boolean result
抛出:
TimeoutException
InterruptedException
MemcachedException

replace

public final boolean replace(String key,
                             int exp,
                             Object value)
                      throws TimeoutException,
                             InterruptedException,
                             MemcachedException
指定者:
接口 MemcachedClient 中的 replace
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.replace(String, int, Object, Transcoder, long)

replace

public final boolean replace(String key,
                             int exp,
                             Object value,
                             long timeout)
                      throws TimeoutException,
                             InterruptedException,
                             MemcachedException
指定者:
接口 MemcachedClient 中的 replace
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.replace(String, int, Object, Transcoder, long)

replace

public final <T> boolean replace(String key,
                                 int exp,
                                 T value,
                                 Transcoder<T> transcoder)
                      throws TimeoutException,
                             InterruptedException,
                             MemcachedException
指定者:
接口 MemcachedClient 中的 replace
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.replace(String, int, Object, Transcoder, long)

append

public final boolean append(String key,
                            Object value)
                     throws TimeoutException,
                            InterruptedException,
                            MemcachedException
指定者:
接口 MemcachedClient 中的 append
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.append(String, Object, long)

append

public final boolean append(String key,
                            Object value,
                            long timeout)
                     throws TimeoutException,
                            InterruptedException,
                            MemcachedException
从接口 MemcachedClient 复制的描述
Append value to key's data item,this method will wait for reply

指定者:
接口 MemcachedClient 中的 append
返回:
boolean result
抛出:
TimeoutException
InterruptedException
MemcachedException

appendWithNoReply

public void appendWithNoReply(String key,
                              Object value)
                       throws InterruptedException,
                              MemcachedException
从接口 MemcachedClient 复制的描述
Append value to key's data item,this method doesn't wait for reply.

指定者:
接口 MemcachedClient 中的 appendWithNoReply
抛出:
InterruptedException
MemcachedException

prepend

public final boolean prepend(String key,
                             Object value)
                      throws TimeoutException,
                             InterruptedException,
                             MemcachedException
指定者:
接口 MemcachedClient 中的 prepend
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.prepend(String, Object, long)

prepend

public final boolean prepend(String key,
                             Object value,
                             long timeout)
                      throws TimeoutException,
                             InterruptedException,
                             MemcachedException
从接口 MemcachedClient 复制的描述
Prepend value to key's data item in memcached.This method doesn't wait for reply.

指定者:
接口 MemcachedClient 中的 prepend
返回:
boolean result
抛出:
TimeoutException
InterruptedException
MemcachedException

prependWithNoReply

public void prependWithNoReply(String key,
                               Object value)
                        throws InterruptedException,
                               MemcachedException
从接口 MemcachedClient 复制的描述
Prepend value to key's data item in memcached.This method doesn't wait for reply.

指定者:
接口 MemcachedClient 中的 prependWithNoReply
抛出:
InterruptedException
MemcachedException

cas

public final boolean cas(String key,
                         int exp,
                         Object value,
                         long cas)
                  throws TimeoutException,
                         InterruptedException,
                         MemcachedException
指定者:
接口 MemcachedClient 中的 cas
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.cas(String, int, Object, Transcoder, long, long)

cas

public final <T> boolean cas(String key,
                             int exp,
                             T value,
                             Transcoder<T> transcoder,
                             long timeout,
                             long cas)
                  throws TimeoutException,
                         InterruptedException,
                         MemcachedException
从接口 MemcachedClient 复制的描述
Cas is a check and set operation which means "store this data but only if no one else has updated since I last fetched it."

指定者:
接口 MemcachedClient 中的 cas
exp - An expiration time, in seconds. Can be up to 30 days. After 30 days, is treated as a unix timestamp of an exact date.
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException

cas

public final boolean cas(String key,
                         int exp,
                         Object value,
                         long timeout,
                         long cas)
                  throws TimeoutException,
                         InterruptedException,
                         MemcachedException
指定者:
接口 MemcachedClient 中的 cas
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.cas(String, int, Object, Transcoder, long, long)

cas

public final <T> boolean cas(String key,
                             int exp,
                             T value,
                             Transcoder<T> transcoder,
                             long cas)
                  throws TimeoutException,
                         InterruptedException,
                         MemcachedException
指定者:
接口 MemcachedClient 中的 cas
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.cas(String, int, Object, Transcoder, long, long)

cas

public final <T> boolean cas(String key,
                             int exp,
                             CASOperation<T> operation,
                             Transcoder<T> transcoder)
                  throws TimeoutException,
                         InterruptedException,
                         MemcachedException
从接口 MemcachedClient 复制的描述
Cas is a check and set operation which means "store this data but only if no one else has updated since I last fetched it."

指定者:
接口 MemcachedClient 中的 cas
exp - An expiration time, in seconds. Can be up to 30 days. After 30 days, is treated as a unix timestamp of an exact date.
operation - CASOperation
transcoder - object transcoder
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException

cas

public final <T> boolean cas(String key,
                             int exp,
                             GetsResponse<T> getsReponse,
                             CASOperation<T> operation,
                             Transcoder<T> transcoder)
                  throws TimeoutException,
                         InterruptedException,
                         MemcachedException
从接口 MemcachedClient 复制的描述
cas is a check and set operation which means "store this data but only if no one else has updated since I last fetched it."

指定者:
接口 MemcachedClient 中的 cas
exp - An expiration time, in seconds. Can be up to 30 days. After 30 days, is treated as a unix timestamp of an exact date.
getsReponse - gets method's result
operation - CASOperation
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException

cas

public final <T> boolean cas(String key,
                             int exp,
                             GetsResponse<T> getsReponse,
                             CASOperation<T> operation)
                  throws TimeoutException,
                         InterruptedException,
                         MemcachedException
指定者:
接口 MemcachedClient 中的 cas
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.cas(String, int, GetsResponse, CASOperation, Transcoder)

casWithNoReply

public <T> void casWithNoReply(String key,
                               CASOperation<T> operation)
                    throws TimeoutException,
                           InterruptedException,
                           MemcachedException
指定者:
接口 MemcachedClient 中的 casWithNoReply
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.casWithNoReply(String, int, GetsResponse, CASOperation)

casWithNoReply

public <T> void casWithNoReply(String key,
                               GetsResponse<T> getsResponse,
                               CASOperation<T> operation)
                    throws TimeoutException,
                           InterruptedException,
                           MemcachedException
指定者:
接口 MemcachedClient 中的 casWithNoReply
抛出:
TimeoutException
InterruptedException
MemcachedException

casWithNoReply

public <T> void casWithNoReply(String key,
                               int exp,
                               CASOperation<T> operation)
                    throws TimeoutException,
                           InterruptedException,
                           MemcachedException
指定者:
接口 MemcachedClient 中的 casWithNoReply
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.casWithNoReply(String, int, GetsResponse, CASOperation)

casWithNoReply

public <T> void casWithNoReply(String key,
                               int exp,
                               GetsResponse<T> getsReponse,
                               CASOperation<T> operation)
                    throws TimeoutException,
                           InterruptedException,
                           MemcachedException
从接口 MemcachedClient 复制的描述
cas noreply

指定者:
接口 MemcachedClient 中的 casWithNoReply
抛出:
TimeoutException
InterruptedException
MemcachedException

cas

public final <T> boolean cas(String key,
                             GetsResponse<T> getsReponse,
                             CASOperation<T> operation)
                  throws TimeoutException,
                         InterruptedException,
                         MemcachedException
指定者:
接口 MemcachedClient 中的 cas
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.cas(String, int, GetsResponse, CASOperation, Transcoder)

cas

public final <T> boolean cas(String key,
                             int exp,
                             CASOperation<T> operation)
                  throws TimeoutException,
                         InterruptedException,
                         MemcachedException
指定者:
接口 MemcachedClient 中的 cas
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.cas(String, int, GetsResponse, CASOperation, Transcoder)

cas

public final <T> boolean cas(String key,
                             CASOperation<T> operation)
                  throws TimeoutException,
                         InterruptedException,
                         MemcachedException
指定者:
接口 MemcachedClient 中的 cas
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
MemcachedClient.cas(String, int, GetsResponse, CASOperation, Transcoder)

delete

public final boolean delete(String key,
                            int time)
                     throws TimeoutException,
                            InterruptedException,
                            MemcachedException
从接口 MemcachedClient 复制的描述
Delete key's data item from memcached.It it is not exists,return false.
time is the amount of time in seconds (or Unix time until
which) the client wishes the server to refuse "add" and "replace"
commands with this key. For this amount of item, the item is put into a
delete queue, which means that it won't possible to retrieve it by the
"get" command, but "add" and "replace" command with this key will also
fail (the "set" command will succeed, however). After the time passes,
the item is finally deleted from server memory.
Note: This method is deprecated,because memcached 1.4.0 remove the optional argument "time".You can still use this method on old version,but is not recommended.

指定者:
接口 MemcachedClient 中的 delete
抛出:
InterruptedException
MemcachedException
TimeoutException

delete

public boolean delete(String key,
                      long opTimeout)
               throws TimeoutException,
                      InterruptedException,
                      MemcachedException
从接口 MemcachedClient 复制的描述
Delete key's date item from memcached

指定者:
接口 MemcachedClient 中的 delete
opTimeout - Operation timeout
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException

deleteWithNoReply

public final void deleteWithNoReply(String key,
                                    int time)
                             throws InterruptedException,
                                    MemcachedException
Delete key's data item from memcached.This method doesn't wait for reply

指定者:
接口 MemcachedClient 中的 deleteWithNoReply
参数:
key -
time -
抛出:
InterruptedException
MemcachedException

deleteWithNoReply

public final void deleteWithNoReply(String key)
                             throws InterruptedException,
                                    MemcachedException
指定者:
接口 MemcachedClient 中的 deleteWithNoReply
抛出:
InterruptedException
MemcachedException

touch

public boolean touch(String key,
                     int exp,
                     long opTimeout)
              throws TimeoutException,
                     InterruptedException,
                     MemcachedException
从接口 MemcachedClient 复制的描述
Set a new expiration time for an existing item

指定者:
接口 MemcachedClient 中的 touch
参数:
key - item's key
exp - New expiration time, in seconds. Can be up to 30 days. After 30 days, is treated as a unix timestamp of an exact date.
opTimeout - operation timeout
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException

touch

public boolean touch(String key,
                     int exp)
              throws TimeoutException,
                     InterruptedException,
                     MemcachedException
从接口 MemcachedClient 复制的描述
Set a new expiration time for an existing item,using default opTimeout second.

指定者:
接口 MemcachedClient 中的 touch
参数:
key - item's key
exp - New expiration time, in seconds. Can be up to 30 days. After 30 days, is treated as a unix timestamp of an exact date.
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException

getAndTouch

public <T> T getAndTouch(String key,
                         int newExp,
                         long opTimeout)
              throws TimeoutException,
                     InterruptedException,
                     MemcachedException
从接口 MemcachedClient 复制的描述
Get item and set a new expiration time for it

指定者:
接口 MemcachedClient 中的 getAndTouch
参数:
key - item's key
newExp - New expiration time, in seconds. Can be up to 30 days. After 30 days, is treated as a unix timestamp of an exact date.
opTimeout - operation timeout
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException

getAndTouch

public <T> T getAndTouch(String key,
                         int newExp)
              throws TimeoutException,
                     InterruptedException,
                     MemcachedException
从接口 MemcachedClient 复制的描述
Get item and set a new expiration time for it,using default opTimeout

指定者:
接口 MemcachedClient 中的 getAndTouch
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException

incr

public final long incr(String key,
                       long delta)
                throws TimeoutException,
                       InterruptedException,
                       MemcachedException
从接口 MemcachedClient 复制的描述
"incr" are used to change data for some item in-place, incrementing it. The data for the item is treated as decimal representation of a 64-bit unsigned integer. If the current data value does not conform to such a representation, the commands behave as if the value were 0. Also, the item must already exist for incr to work; these commands won't pretend that a non-existent key exists with value 0; instead, it will fail.This method doesn't wait for reply.

指定者:
接口 MemcachedClient 中的 incr
返回:
the new value of the item's data, after the increment operation was carried out.
抛出:
InterruptedException
MemcachedException
TimeoutException

incr

public long incr(String key,
                 long delta,
                 long initValue)
          throws TimeoutException,
                 InterruptedException,
                 MemcachedException
指定者:
接口 MemcachedClient 中的 incr
抛出:
TimeoutException
InterruptedException
MemcachedException

incr

public long incr(String key,
                 long delta,
                 long initValue,
                 long timeout)
          throws TimeoutException,
                 InterruptedException,
                 MemcachedException
从接口 MemcachedClient 复制的描述
"incr" are used to change data for some item in-place, incrementing it. The data for the item is treated as decimal representation of a 64-bit unsigned integer. If the current data value does not conform to such a representation, the commands behave as if the value were 0. Also, the item must already exist for incr to work; these commands won't pretend that a non-existent key exists with value 0; instead, it will fail.This method doesn't wait for reply.

指定者:
接口 MemcachedClient 中的 incr
参数:
key - key
initValue - initValue if the data is not exists.
timeout - operation timeout
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException

incr

public long incr(String key,
                 long delta,
                 long initValue,
                 long timeout,
                 int exp)
          throws TimeoutException,
                 InterruptedException,
                 MemcachedException
从接口 MemcachedClient 复制的描述
"incr" are used to change data for some item in-place, incrementing it. The data for the item is treated as decimal representation of a 64-bit unsigned integer. If the current data value does not conform to such a representation, the commands behave as if the value were 0. Also, the item must already exist for incr to work; these commands won't pretend that a non-existent key exists with value 0; instead, it will fail.This method doesn't wait for reply.

指定者:
接口 MemcachedClient 中的 incr
参数:
key - key
delta - increment delta
initValue - the initial value to be added when value is not found
timeout - operation timeout
exp - the initial vlaue expire time, in seconds. Can be up to 30 days. After 30 days, is treated as a unix timestamp of an exact date.
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException

incrWithNoReply

public final void incrWithNoReply(String key,
                                  long delta)
                           throws InterruptedException,
                                  MemcachedException
从接口 MemcachedClient 复制的描述
"incr" are used to change data for some item in-place, incrementing it. The data for the item is treated as decimal representation of a 64-bit unsigned integer. If the current data value does not conform to such a representation, the commands behave as if the value were 0. Also, the item must already exist for incr to work; these commands won't pretend that a non-existent key exists with value 0; instead, it will fail.This method doesn't wait for reply.

指定者:
接口 MemcachedClient 中的 incrWithNoReply
抛出:
InterruptedException
MemcachedException

decrWithNoReply

public final void decrWithNoReply(String key,
                                  long delta)
                           throws InterruptedException,
                                  MemcachedException
从接口 MemcachedClient 复制的描述
"decr" are used to change data for some item in-place, decrementing it. The data for the item is treated as decimal representation of a 64-bit unsigned integer. If the current data value does not conform to such a representation, the commands behave as if the value were 0. Also, the item must already exist for decr to work; these commands won't pretend that a non-existent key exists with value 0; instead, it will fail.This method doesn't wait for reply.

指定者:
接口 MemcachedClient 中的 decrWithNoReply
抛出:
InterruptedException
MemcachedException

decr

public final long decr(String key,
                       long delta)
                throws TimeoutException,
                       InterruptedException,
                       MemcachedException
从接口 MemcachedClient 复制的描述
"decr" are used to change data for some item in-place, decrementing it. The data for the item is treated as decimal representation of a 64-bit unsigned integer. If the current data value does not conform to such a representation, the commands behave as if the value were 0. Also, the item must already exist for decr to work; these commands won't pretend that a non-existent key exists with value 0; instead, it will fail.This method doesn't wait for reply.

指定者:
接口 MemcachedClient 中的 decr
返回:
the new value of the item's data, after the decrement operation was carried out.
抛出:
InterruptedException
MemcachedException
TimeoutException

decr

public long decr(String key,
                 long delta,
                 long initValue)
          throws TimeoutException,
                 InterruptedException,
                 MemcachedException
指定者:
接口 MemcachedClient 中的 decr
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException
另请参见:
decr

decr

public long decr(String key,
                 long delta,
                 long initValue,
                 long timeout)
          throws TimeoutException,
                 InterruptedException,
                 MemcachedException
从接口 MemcachedClient 复制的描述
"decr" are used to change data for some item in-place, decrementing it. The data for the item is treated as decimal representation of a 64-bit unsigned integer. If the current data value does not conform to such a representation, the commands behave as if the value were 0. Also, the item must already exist for decr to work; these commands won't pretend that a non-existent key exists with value 0; instead, it will fail.This method doesn't wait for reply.

指定者:
接口 MemcachedClient 中的 decr
参数:
key - The key
initValue - The initial value if the data is not exists.
timeout - Operation timeout
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException

decr

public long decr(String key,
                 long delta,
                 long initValue,
                 long timeout,
                 int exp)
          throws TimeoutException,
                 InterruptedException,
                 MemcachedException
从接口 MemcachedClient 复制的描述
"incr" are used to change data for some item in-place, incrementing it. The data for the item is treated as decimal representation of a 64-bit unsigned integer. If the current data value does not conform to such a representation, the commands behave as if the value were 0. Also, the item must already exist for incr to work; these commands won't pretend that a non-existent key exists with value 0; instead, it will fail.This method doesn't wait for reply.

指定者:
接口 MemcachedClient 中的 decr
initValue - the initial value to be added when value is not found
exp - the initial vlaue expire time, in seconds. Can be up to 30 days. After 30 days, is treated as a unix timestamp of an exact date.
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException

flushAll

public final void flushAll()
                    throws TimeoutException,
                           InterruptedException,
                           MemcachedException
从接口 MemcachedClient 复制的描述
Make All connected memcached's data item invalid

指定者:
接口 MemcachedClient 中的 flushAll
抛出:
TimeoutException
InterruptedException
MemcachedException

flushAllWithNoReply

public void flushAllWithNoReply()
                         throws InterruptedException,
                                MemcachedException
指定者:
接口 MemcachedClient 中的 flushAllWithNoReply
抛出:
InterruptedException
MemcachedException

flushAllWithNoReply

public void flushAllWithNoReply(int exptime)
                         throws InterruptedException,
                                MemcachedException
指定者:
接口 MemcachedClient 中的 flushAllWithNoReply
抛出:
InterruptedException
MemcachedException

flushAllWithNoReply

public void flushAllWithNoReply(InetSocketAddress address)
                         throws MemcachedException,
                                InterruptedException
指定者:
接口 MemcachedClient 中的 flushAllWithNoReply
抛出:
MemcachedException
InterruptedException

flushAllWithNoReply

public void flushAllWithNoReply(InetSocketAddress address,
                                int exptime)
                         throws MemcachedException,
                                InterruptedException
指定者:
接口 MemcachedClient 中的 flushAllWithNoReply
抛出:
MemcachedException
InterruptedException

flushAll

public final void flushAll(int exptime,
                           long timeout)
                    throws TimeoutException,
                           InterruptedException,
                           MemcachedException
指定者:
接口 MemcachedClient 中的 flushAll
抛出:
TimeoutException
InterruptedException
MemcachedException

flushAll

public final void flushAll(long timeout)
                    throws TimeoutException,
                           InterruptedException,
                           MemcachedException
从接口 MemcachedClient 复制的描述
Make All connected memcached's data item invalid

指定者:
接口 MemcachedClient 中的 flushAll
参数:
timeout - operation timeout
抛出:
TimeoutException
InterruptedException
MemcachedException

setLoggingLevelVerbosity

public void setLoggingLevelVerbosity(InetSocketAddress address,
                                     int level)
                              throws TimeoutException,
                                     InterruptedException,
                                     MemcachedException
从接口 MemcachedClient 复制的描述
Set the verbosity level of the memcached's logging output.This method will wait for reply.

指定者:
接口 MemcachedClient 中的 setLoggingLevelVerbosity
level - logging level
抛出:
TimeoutException
InterruptedException
MemcachedException

setLoggingLevelVerbosityWithNoReply

public void setLoggingLevelVerbosityWithNoReply(InetSocketAddress address,
                                                int level)
                                         throws InterruptedException,
                                                MemcachedException
从接口 MemcachedClient 复制的描述
Set the verbosity level of the memcached's logging output.This method doesn't wait for reply from server

指定者:
接口 MemcachedClient 中的 setLoggingLevelVerbosityWithNoReply
参数:
address - memcached server address
level - logging level
抛出:
InterruptedException
MemcachedException

flushAll

public final void flushAll(InetSocketAddress address)
                    throws MemcachedException,
                           InterruptedException,
                           TimeoutException
从接口 MemcachedClient 复制的描述
Invalidate all existing items immediately

指定者:
接口 MemcachedClient 中的 flushAll
参数:
address - Target memcached server
抛出:
MemcachedException
InterruptedException
TimeoutException

flushAll

public final void flushAll(InetSocketAddress address,
                           long timeout)
                    throws MemcachedException,
                           InterruptedException,
                           TimeoutException
指定者:
接口 MemcachedClient 中的 flushAll
抛出:
MemcachedException
InterruptedException
TimeoutException

flushAll

public final void flushAll(InetSocketAddress address,
                           long timeout,
                           int exptime)
                    throws MemcachedException,
                           InterruptedException,
                           TimeoutException
指定者:
接口 MemcachedClient 中的 flushAll
抛出:
MemcachedException
InterruptedException
TimeoutException

flushAll

public final void flushAll(String host)
                    throws TimeoutException,
                           InterruptedException,
                           MemcachedException
从接口 MemcachedClient 复制的描述
This method is deprecated,please use flushAll(InetSocketAddress) instead.

指定者:
接口 MemcachedClient 中的 flushAll
抛出:
TimeoutException
InterruptedException
MemcachedException

stats

public final Map<String,String> stats(InetSocketAddress address)
                               throws MemcachedException,
                                      InterruptedException,
                                      TimeoutException
指定者:
接口 MemcachedClient 中的 stats
抛出:
MemcachedException
InterruptedException
TimeoutException

stats

public final Map<String,String> stats(InetSocketAddress address,
                                      long timeout)
                               throws MemcachedException,
                                      InterruptedException,
                                      TimeoutException
从接口 MemcachedClient 复制的描述
�ョ��瑰������emcached server缁��淇℃�

指定者:
接口 MemcachedClient 中的 stats
参数:
address - ����板�
timeout - ���瓒��
返回:
抛出:
MemcachedException
InterruptedException
TimeoutException

getStats

public final Map<InetSocketAddress,Map<String,String>> getStats()
                                                         throws MemcachedException,
                                                                InterruptedException,
                                                                TimeoutException
指定者:
接口 MemcachedClient 中的 getStats
抛出:
MemcachedException
InterruptedException
TimeoutException

getStatsByItem

public final Map<InetSocketAddress,Map<String,String>> getStatsByItem(String itemName)
                                                               throws MemcachedException,
                                                                      InterruptedException,
                                                                      TimeoutException
从接口 MemcachedClient 复制的描述
Get special item stats. "stats items" for example

指定者:
接口 MemcachedClient 中的 getStatsByItem
返回:
抛出:
MemcachedException
InterruptedException
TimeoutException

getStatsByItem

public final Map<InetSocketAddress,Map<String,String>> getStatsByItem(String itemName,
                                                                      long timeout)
                                                               throws MemcachedException,
                                                                      InterruptedException,
                                                                      TimeoutException
指定者:
接口 MemcachedClient 中的 getStatsByItem
抛出:
MemcachedException
InterruptedException
TimeoutException

getVersions

public final Map<InetSocketAddress,String> getVersions()
                                                throws TimeoutException,
                                                       InterruptedException,
                                                       MemcachedException
从接口 MemcachedClient 复制的描述
Get all connected memcached servers's version.

指定者:
接口 MemcachedClient 中的 getVersions
返回:
抛出:
TimeoutException
InterruptedException
MemcachedException

getVersions

public final Map<InetSocketAddress,String> getVersions(long timeout)
                                                throws TimeoutException,
                                                       InterruptedException,
                                                       MemcachedException
指定者:
接口 MemcachedClient 中的 getVersions
抛出:
TimeoutException
InterruptedException
MemcachedException

getStats

public Map<InetSocketAddress,Map<String,String>> getStats(long timeout)
                                                   throws MemcachedException,
                                                          InterruptedException,
                                                          TimeoutException
从接口 MemcachedClient 复制的描述
Get stats from all memcached servers

指定者:
接口 MemcachedClient 中的 getStats
返回:
server->item->value map
抛出:
MemcachedException
InterruptedException
TimeoutException

shutdown

public final void shutdown()
                    throws IOException
指定者:
接口 MemcachedClient 中的 shutdown
抛出:
IOException

setConnectionPoolSize

public void setConnectionPoolSize(int poolSize)
从接口 MemcachedClient 复制的描述
In a high concurrent enviroment,you may want to pool memcached clients.But a xmemcached client has to start a reactor thread and some thread pools,if you create too many clients,the cost is very large. Xmemcached supports connection pool instreadof client pool.you can create more connections to one or more memcached servers,and these connections share the same reactor and thread pools,it will reduce the cost of system.

指定者:
接口 MemcachedClient 中的 setConnectionPoolSize
参数:
poolSize - pool size,default is one,every memcached has only one connection.

delete

public final boolean delete(String key)
                     throws TimeoutException,
                            InterruptedException,
                            MemcachedException
指定者:
接口 MemcachedClient 中的 delete
抛出:
TimeoutException
InterruptedException
MemcachedException

getTranscoder

public final Transcoder getTranscoder()
从接口 MemcachedClient 复制的描述
return default transcoder,default is SerializingTranscoder

指定者:
接口 MemcachedClient 中的 getTranscoder
返回:

setTranscoder

public final void setTranscoder(Transcoder transcoder)
从接口 MemcachedClient 复制的描述
set transcoder

指定者:
接口 MemcachedClient 中的 setTranscoder

getAvaliableServers

public final Collection<InetSocketAddress> getAvaliableServers()
已过时。 

Use getAvailableServers() instead

指定者:
接口 MemcachedClient 中的 getAvaliableServers
返回:
另请参见:
MemcachedClient.getAvailableServers()

getAvailableServers

public Collection<InetSocketAddress> getAvailableServers()
从接口 MemcachedClient 复制的描述
Returns available memcached servers list.

指定者:
接口 MemcachedClient 中的 getAvailableServers
返回:
A available server collection

getConnectionSizeBySocketAddress

public final int getConnectionSizeBySocketAddress(InetSocketAddress address)

addStateListener

public void addStateListener(MemcachedClientStateListener listener)
从接口 MemcachedClient 复制的描述
Add a memcached client listener

指定者:
接口 MemcachedClient 中的 addStateListener

getStateListeners

public Collection<MemcachedClientStateListener> getStateListeners()
从接口 MemcachedClient 复制的描述
Get all current state listeners

指定者:
接口 MemcachedClient 中的 getStateListeners
返回:

setPrimitiveAsString

public void setPrimitiveAsString(boolean primitiveAsString)
从接口 MemcachedClient 复制的描述
Store all primitive type as string,defualt is false.

指定者:
接口 MemcachedClient 中的 setPrimitiveAsString

removeStateListener

public void removeStateListener(MemcachedClientStateListener listener)
从接口 MemcachedClient 复制的描述
Remove a memcached client listener

指定者:
接口 MemcachedClient 中的 removeStateListener

getProtocol

public Protocol getProtocol()
指定者:
接口 MemcachedClient 中的 getProtocol

isSanitizeKeys

public boolean isSanitizeKeys()
指定者:
接口 MemcachedClient 中的 isSanitizeKeys

setSanitizeKeys

public void setSanitizeKeys(boolean sanitizeKeys)
从接口 MemcachedClient 复制的描述
Enables/disables sanitizing keys by URLEncoding.

指定者:
接口 MemcachedClient 中的 setSanitizeKeys
参数:
sanitizeKeys - if true, then URLEncode all keys

getCounter

public Counter getCounter(String key,
                          long initialValue)
从接口 MemcachedClient 复制的描述
Get counter for key,and if the key's value is not set,then set it with initial value.

指定者:
接口 MemcachedClient 中的 getCounter
返回:

getCounter

public Counter getCounter(String key)
从接口 MemcachedClient 复制的描述
Get counter for key,and if the key's value is not set,then set it with 0.

指定者:
接口 MemcachedClient 中的 getCounter
返回:

getKeyIterator

public KeyIterator getKeyIterator(InetSocketAddress address)
                           throws MemcachedException,
                                  TimeoutException,
                                  InterruptedException
已过时。 memcached 1.6.x will remove cachedump stats command,so this method will be removed in the future

从接口 MemcachedClient 复制的描述
Get key iterator for special memcached server.You must known that the iterator is a snapshot for memcached all keys,it is not real-time.The 'stats cachedump" has length limitation,so iterator could not visit all keys if you have many keys.Your application should not be dependent on this feature.

指定者:
接口 MemcachedClient 中的 getKeyIterator
返回:
抛出:
MemcachedException
TimeoutException
InterruptedException

setEnableHealSession

public void setEnableHealSession(boolean enableHealSession)
从接口 MemcachedClient 复制的描述
If the memcached dump or network error cause connection closed,xmemcached would try to heal the connection.You can disable this behaviour by using this method:
client.setEnableHealSession(false);
The default value is true.

指定者:
接口 MemcachedClient 中的 setEnableHealSession

setFailureMode

public void setFailureMode(boolean failureMode)
从接口 MemcachedClient 复制的描述
Configure wheather to set client in failure mode.If set it to true,that means you want to configure client in failure mode. Failure mode is that when a memcached server is down,it would not taken from the server list but marked as unavailable,and then further requests to this server will be transformed to standby node if configured or throw an exception until it comes back up.

指定者:
接口 MemcachedClient 中的 setFailureMode
参数:
failureMode - true is to configure client in failure mode.

isFailureMode

public boolean isFailureMode()
从接口 MemcachedClient 复制的描述
Returns if client is in failure mode.

指定者:
接口 MemcachedClient 中的 isFailureMode
返回:

getReconnectRequestQueue

public Queue<ReconnectRequest> getReconnectRequestQueue()
从接口 MemcachedClient 复制的描述
Returns reconnecting task queue,the queue is thread-safe and 'weakly consistent',but maybe you should not modify it at all.

指定者:
接口 MemcachedClient 中的 getReconnectRequestQueue
返回:
The reconnecting task queue,if the client has not been started,returns null.


Copyright © 2013. All Rights Reserved.