public class MemcachedServer extends Thread implements BinaryProtocolHandler
| Modifier and Type | Class and Description |
|---|---|
static class |
MemcachedServer.CommandLogEntry |
class |
MemcachedServer.FailMaker |
Thread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
MemcachedServer(Bucket bucket,
String hostname,
int port,
VBucketInfo[] vbi,
boolean cccpEnabled)
Create a new new memcached server.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic MemcachedServer(Bucket bucket, String hostname, int port, VBucketInfo[] vbi, boolean cccpEnabled) throws IOException
bucket - The bucket owning all of the storeshostname - The hostname to connect to (null == any)port - The port this server should listen to (0 to choose an
ephemeral port)vbi - Vbucket InfoIOException - If we fail to create the server socketpublic void setEnhancedErrorsEnabled(boolean enhancedErrorsEnabled)
public boolean isEnhancedErrorsEnabled()
public Storage getStorage()
public void updateFailMakerContext(ErrorCode code, int count)
public String getSocketName()
public int getPort()
public String getHostname()
public Bucket getBucket()
public void execute(BinaryCommand cmd, MemcachedConnection client) throws IOException
execute in interface BinaryProtocolHandlerIOExceptionpublic void shutdown()
public void startup()
public void setHiccup(int milliSeconds,
int offset)
milliSeconds - how long to stall foroffset - how far along the output buffer should we hiccuppublic void setTruncateLimit(int limit)
public void flushNode()
public void flushAll()
public VBucketStore getCache(BinaryCommand cmd)
public static void main(String[] args)
args - Program arguments (not used)public boolean isActive()
public boolean isCccpEnabled()
public void setCccpEnabled(boolean enabled)
public Bucket.BucketType getType()
public MemcachedConnection findConnection(SocketAddress address) throws IOException
IOExceptionpublic void startLog()
public void stopLog()
public List<MemcachedServer.CommandLogEntry> getLogs()
Copyright © 2017. All rights reserved.