public class ClosedMemcachedTCPSession extends Object implements MemcachedSession
Session.SessionStatus| 构造器和说明 |
|---|
ClosedMemcachedTCPSession(InetSocketAddressWrapper inetSocketAddressWrapper) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clearAttributes()
Clear attributes
|
void |
close()
Close session
|
void |
destroy() |
void |
flush()
Flush the write queue,this method may be no effect if OP_WRITE is
running.
|
Object |
getAttribute(String key)
Return attribute associated with key
|
CodecFactory.Decoder |
getDecoder()
Return current decoder
|
CodecFactory.Encoder |
getEncoder()
Return current encoder
|
Handler |
getHandler() |
InetSocketAddressWrapper |
getInetSocketAddressWrapper() |
long |
getLastOperationTimeStamp()
Return last operation timestamp,operation include read,write,idle
|
InetAddress |
getLocalAddress() |
int |
getOrder() |
ByteOrder |
getReadBufferByteOrder()
Return the session read buffer's byte order,big end or little end.
|
InetSocketAddress |
getRemoteSocketAddress()
Return the remote end's InetSocketAddress
|
long |
getScheduleWritenBytes()
Return the bytes in write queue,there bytes is in memory.Use this method
to controll writing speed.
|
long |
getSessionIdleTimeout() |
long |
getSessionTimeout() |
int |
getWeight() |
boolean |
isAllowReconnect() |
boolean |
isAuthFailed() |
boolean |
isClosed()
Check if session is closed
|
boolean |
isExpired()
Return true if session is expired,session is expired beacause you set the
sessionTimeout,if since session's last operation form now is over this
vlaue,isExpired return true,and Handler.onExpired() will be invoked.
|
boolean |
isHandleReadWriteConcurrently()
Return true if allow handling read and write concurrently,default is
true.
|
boolean |
isIdle()
Check if session is idle
|
boolean |
isLoopbackConnection()
return true if it is a loopback connection
|
boolean |
isUseBlockingRead()
Return true if using blocking read
|
boolean |
isUseBlockingWrite()
Return true if using blocking write
|
void |
quit() |
void |
removeAttribute(String key)
Remove attribute
|
void |
setAllowReconnect(boolean allow) |
void |
setAttribute(String key,
Object value)
Set a attribute attched with this session
|
Object |
setAttributeIfAbsent(String key,
Object value) |
void |
setAuthFailed(boolean authFailed) |
void |
setBufferAllocator(BufferAllocator allocator) |
void |
setDecoder(CodecFactory.Decoder decoder) |
void |
setEncoder(CodecFactory.Encoder encoder)
Set encoder
|
void |
setHandleReadWriteConcurrently(boolean handleReadWriteConcurrently) |
void |
setReadBufferByteOrder(ByteOrder readBufferByteOrder) |
void |
setSessionIdleTimeout(long sessionIdleTimeout) |
void |
setSessionTimeout(long sessionTimeout) |
void |
setUseBlockingRead(boolean useBlockingRead) |
void |
setUseBlockingWrite(boolean useBlockingWrite)
Set if using blocking write
|
void |
start()
Start session
|
void |
write(Object packet)
Write a message,if you don't care when the message is written
|
public ClosedMemcachedTCPSession(InetSocketAddressWrapper inetSocketAddressWrapper)
public void destroy()
destroy 在接口中 MemcachedSessionpublic InetSocketAddressWrapper getInetSocketAddressWrapper()
getInetSocketAddressWrapper 在接口中 MemcachedSessionpublic int getOrder()
getOrder 在接口中 MemcachedSessionpublic int getWeight()
getWeight 在接口中 MemcachedSessionpublic boolean isAllowReconnect()
isAllowReconnect 在接口中 MemcachedSessionpublic void quit()
quit 在接口中 MemcachedSessionpublic void setAllowReconnect(boolean allow)
setAllowReconnect 在接口中 MemcachedSessionpublic void setBufferAllocator(BufferAllocator allocator)
setBufferAllocator 在接口中 MemcachedSessionpublic void clearAttributes()
SessionclearAttributes 在接口中 Sessionpublic void flush()
Sessionpublic Object getAttribute(String key)
SessiongetAttribute 在接口中 Sessionpublic CodecFactory.Decoder getDecoder()
SessiongetDecoder 在接口中 Sessionpublic CodecFactory.Encoder getEncoder()
SessiongetEncoder 在接口中 Sessionpublic Handler getHandler()
getHandler 在接口中 Sessionpublic long getLastOperationTimeStamp()
SessiongetLastOperationTimeStamp 在接口中 Sessionpublic InetAddress getLocalAddress()
getLocalAddress 在接口中 Sessionpublic ByteOrder getReadBufferByteOrder()
SessiongetReadBufferByteOrder 在接口中 Sessionpublic InetSocketAddress getRemoteSocketAddress()
SessiongetRemoteSocketAddress 在接口中 Sessionpublic long getScheduleWritenBytes()
SessiongetScheduleWritenBytes 在接口中 Sessionpublic long getSessionIdleTimeout()
getSessionIdleTimeout 在接口中 Sessionpublic long getSessionTimeout()
getSessionTimeout 在接口中 Sessionpublic boolean isClosed()
Sessionpublic boolean isExpired()
Sessionpublic boolean isHandleReadWriteConcurrently()
SessionisHandleReadWriteConcurrently 在接口中 Sessionpublic boolean isIdle()
Sessionpublic boolean isLoopbackConnection()
SessionisLoopbackConnection 在接口中 Sessionpublic boolean isUseBlockingRead()
SessionisUseBlockingRead 在接口中 Sessionpublic boolean isUseBlockingWrite()
SessionisUseBlockingWrite 在接口中 Sessionpublic void removeAttribute(String key)
SessionremoveAttribute 在接口中 Sessionpublic void setAttribute(String key, Object value)
SessionsetAttribute 在接口中 Sessionpublic Object setAttributeIfAbsent(String key, Object value)
setAttributeIfAbsent 在接口中 Sessionpublic void setDecoder(CodecFactory.Decoder decoder)
setDecoder 在接口中 Sessionpublic void setEncoder(CodecFactory.Encoder encoder)
SessionsetEncoder 在接口中 Sessionpublic void setHandleReadWriteConcurrently(boolean handleReadWriteConcurrently)
setHandleReadWriteConcurrently 在接口中 Sessionpublic void setReadBufferByteOrder(ByteOrder readBufferByteOrder)
setReadBufferByteOrder 在接口中 Sessionpublic void setSessionIdleTimeout(long sessionIdleTimeout)
setSessionIdleTimeout 在接口中 Sessionpublic void setSessionTimeout(long sessionTimeout)
setSessionTimeout 在接口中 Sessionpublic void setUseBlockingRead(boolean useBlockingRead)
setUseBlockingRead 在接口中 Sessionpublic boolean isAuthFailed()
isAuthFailed 在接口中 MemcachedSessionpublic void setAuthFailed(boolean authFailed)
setAuthFailed 在接口中 MemcachedSessionpublic void setUseBlockingWrite(boolean useBlockingWrite)
SessionsetUseBlockingWrite 在接口中 SessionCopyright © 2013. All Rights Reserved.