Replicator
, ReplicatorListener
, Closeable
, AutoCloseable
public class RedisSocketReplicator extends AbstractReplicator
限定符和类型 | 类 | 说明 |
---|---|---|
protected static class |
RedisSocketReplicator.SyncMode |
限定符和类型 | 字段 | 说明 |
---|---|---|
protected ScheduledExecutorService |
executor |
|
protected ScheduledFuture<?> |
heartbeat |
|
protected String |
host |
|
protected static org.slf4j.Logger |
logger |
|
protected RedisOutputStream |
outputStream |
|
protected int |
port |
|
protected ReplyParser |
replyParser |
|
protected Socket |
socket |
|
protected RedisSocketFactory |
socketFactory |
commands, configuration, connected, inputStream, modules, rdbVisitor
auxFieldListeners, closeListeners, commandListeners, exceptionListeners, rawByteListeners, rdbListeners
构造器 | 说明 |
---|---|
RedisSocketReplicator(String host,
int port,
Configuration configuration) |
限定符和类型 | 方法 | 说明 |
---|---|---|
protected void |
auth(String password) |
|
protected void |
connect() |
|
protected void |
doClose() |
|
protected void |
establishConnection() |
|
protected void |
heartbeat() |
|
void |
open() |
PSYNC
|
protected void |
parseDump(AbstractReplicator replicator) |
|
protected <T> T |
reply() |
|
protected <T> T |
reply(BulkReplyHandler handler) |
|
protected void |
send(byte[] command) |
|
protected void |
send(byte[] command,
byte[]... args) |
|
protected void |
sendPing() |
|
protected void |
sendQuietly(byte[] command,
byte[]... args) |
|
protected void |
sendSlaveCapa(String cmd) |
|
protected void |
sendSlaveIp() |
|
protected void |
sendSlavePort() |
|
protected RedisSocketReplicator.SyncMode |
trySync(String reply) |
addCommandParser, addModuleParser, builtInCommandParserRegister, close, getCommandParser, getConfiguration, getModuleParser, getRdbVisitor, getStatus, removeCommandParser, removeModuleParser, setRdbVisitor, submitEvent, verbose
addAuxFieldListener, addCloseListener, addCommandListener, addExceptionListener, addRawByteListener, addRdbListener, doAuxFieldListener, doCloseListener, doCommandListener, doExceptionListener, doPostFullSync, doPreFullSync, doRawByteListener, doRdbListener, handle, removeAuxFieldListener, removeCloseListener, removeCommandListener, removeExceptionListener, removeRawByteListener, removeRdbListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addAuxFieldListener, addCloseListener, addCommandListener, addExceptionListener, addRawByteListener, addRdbListener, removeAuxFieldListener, removeCloseListener, removeCommandListener, removeExceptionListener, removeRawByteListener, removeRdbListener
protected static final org.slf4j.Logger logger
protected final int port
protected final String host
protected Socket socket
protected ReplyParser replyParser
protected ScheduledFuture<?> heartbeat
protected RedisOutputStream outputStream
protected final RedisSocketFactory socketFactory
protected ScheduledExecutorService executor
public RedisSocketReplicator(String host, int port, Configuration configuration)
public void open() throws IOException
IOException
- when read timeout or connect timeoutprotected RedisSocketReplicator.SyncMode trySync(String reply) throws IOException
IOException
protected void parseDump(AbstractReplicator replicator) throws IOException
IOException
protected void establishConnection() throws IOException
IOException
protected void auth(String password) throws IOException
IOException
protected void sendPing() throws IOException
IOException
protected void sendSlavePort() throws IOException
IOException
protected void sendSlaveIp() throws IOException
IOException
protected void sendSlaveCapa(String cmd) throws IOException
IOException
protected void heartbeat()
protected void send(byte[] command) throws IOException
IOException
protected void send(byte[] command, byte[]... args) throws IOException
IOException
protected void sendQuietly(byte[] command, byte[]... args)
protected <T> T reply() throws IOException
IOException
protected <T> T reply(BulkReplyHandler handler) throws IOException
IOException
protected void connect() throws IOException
IOException
protected void doClose() throws IOException
doClose
在类中 AbstractReplicator
IOException
Copyright © 2018. All rights reserved.