public class MemcachedTCPSession extends NioTCPSession implements MemcachedSession
Session.SessionStatus
Modifier and Type | Field and Description |
---|---|
protected BlockingQueue<Command> |
commandAlreadySent
Command which are already sent
|
selectableChannel, selectorManager
attributes, closed, currentMessage, decoder, dispatchMessageDispatcher, encoder, handler, handleReadWriteConcurrently, lastOperationTimeStamp, log, loopback, readBuffer, scheduleWritenBytes, sessionIdleTimeout, sessionTimeout, statistics, useBlockingRead, useBlockingWrite, writeLock, writeQueue
Constructor and Description |
---|
MemcachedTCPSession(NioSessionConfig sessionConfig,
int readRecvBufferSize,
MemcachedOptimizer optimiezer,
int readThreadCount,
CommandFactory commandFactory) |
Modifier and Type | Method and Description |
---|---|
void |
addCommand(Command command) |
void |
destroy() |
BufferAllocator |
getBufferAllocator() |
Command |
getCurrentCommand() |
InetSocketAddressWrapper |
getInetSocketAddressWrapper() |
int |
getOrder() |
InetSocketAddress |
getRemoteSocketAddress()
Return the remote end's InetSocketAddress
|
int |
getWeight() |
boolean |
isAllowReconnect()
is allow auto recconect if closed?
|
boolean |
isAuthFailed() |
protected WriteMessage |
preprocessWriteMessage(WriteMessage writeMessage)
Pre-Process WriteMessage before writing to channel
|
void |
quit() |
void |
setAllowReconnect(boolean reconnected) |
void |
setAuthFailed(boolean authFailed) |
void |
setBufferAllocator(BufferAllocator bufferAllocator) |
void |
setCurrentCommand(Command cmd) |
void |
setInetSocketAddressWrapper(InetSocketAddressWrapper inetSocketAddressWrapper) |
void |
takeCurrentCommand() |
String |
toString() |
protected WriteMessage |
wrapMessage(Object msg,
Future<Boolean> writeFuture) |
blockingRead, blockingWrite, closeChannel, decode, isExpired, readFromBuffer, socket, writeToChannel
channel, doRealWrite, enableRead, enableWrite, flush, flush0, getLocalAddress, onEvent, onRead, onWrite, registerSession, schduleWriteMessage, start0, unregisterChannel, unregisterSession, writeFromUserCode
clearAttributes, clearWriteQueue, close, dispatchReceivedMessage, getAttribute, getDecoder, getDispatchMessageDispatcher, getEncoder, getHandler, getLastOperationTimeStamp, getReadBuffer, getReadBufferByteOrder, getScheduleWritenBytes, getSessionIdleTimeout, getSessionTimeout, getStatistics, getWriteLock, getWriteQueue, isClosed, isHandleReadWriteConcurrently, isIdle, isLoopbackConnection, isUseBlockingRead, isUseBlockingWrite, onClosed, onConnected, onCreated, onException, onExpired, onIdle, onStarted, removeAttribute, setAttribute, setAttributeIfAbsent, setClosed, setDecoder, setEncoder, setHandleReadWriteConcurrently, setReadBuffer, setReadBufferByteOrder, setSessionIdleTimeout, setSessionTimeout, setUseBlockingRead, setUseBlockingWrite, start, transferFrom, transferTo, updateTimeStamp, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
clearAttributes, close, flush, getAttribute, getDecoder, getEncoder, getHandler, getLastOperationTimeStamp, getLocalAddress, getReadBufferByteOrder, getScheduleWritenBytes, getSessionIdleTimeout, getSessionTimeout, isClosed, isExpired, isHandleReadWriteConcurrently, isIdle, isLoopbackConnection, isUseBlockingRead, isUseBlockingWrite, removeAttribute, setAttribute, setAttributeIfAbsent, setDecoder, setEncoder, setHandleReadWriteConcurrently, setReadBufferByteOrder, setSessionIdleTimeout, setSessionTimeout, setUseBlockingRead, setUseBlockingWrite, start, write
protected BlockingQueue<Command> commandAlreadySent
public MemcachedTCPSession(NioSessionConfig sessionConfig, int readRecvBufferSize, MemcachedOptimizer optimiezer, int readThreadCount, CommandFactory commandFactory)
public InetSocketAddressWrapper getInetSocketAddressWrapper()
getInetSocketAddressWrapper
in interface ClosedMemcachedSession
public int getOrder()
getOrder
in interface ClosedMemcachedSession
public int getWeight()
getWeight
in interface ClosedMemcachedSession
public void setInetSocketAddressWrapper(InetSocketAddressWrapper inetSocketAddressWrapper)
public void destroy()
destroy
in interface MemcachedSession
public InetSocketAddress getRemoteSocketAddress()
Session
getRemoteSocketAddress
in interface Session
getRemoteSocketAddress
in class NioTCPSession
protected WriteMessage preprocessWriteMessage(WriteMessage writeMessage)
AbstractSession
preprocessWriteMessage
in class AbstractSession
public boolean isAuthFailed()
isAuthFailed
in interface MemcachedSession
public void setAuthFailed(boolean authFailed)
setAuthFailed
in interface MemcachedSession
public final BufferAllocator getBufferAllocator()
public final void setBufferAllocator(BufferAllocator bufferAllocator)
setBufferAllocator
in interface MemcachedSession
protected final WriteMessage wrapMessage(Object msg, Future<Boolean> writeFuture)
wrapMessage
in class NioTCPSession
public boolean isAllowReconnect()
isAllowReconnect
in interface ClosedMemcachedSession
public void setAllowReconnect(boolean reconnected)
setAllowReconnect
in interface ClosedMemcachedSession
public void addCommand(Command command)
public void setCurrentCommand(Command cmd)
public Command getCurrentCommand()
public void takeCurrentCommand()
public void quit()
quit
in interface MemcachedSession
Copyright © 2021. All rights reserved.