public class ThreadedClient extends AbstractClient
connList, currentSiteIndexMap, DEFAULT_ACTION_NAME, DEFAULT_HOST, DEFAULT_PORT, HATopicToTrueTopic, hostEndian, ifUseBackupSite, isClose_, lastBackupSiteTopic, lastExceptionTopicTimeMap, lastQueue, lastSuccessSubscribeTopic, listeningHost, listeningPort, messageCache, pThread, queueManager, reconnectTable, resubscribeInterval, subInfos_, subOnce, tableNameToTrueTopic, trueTopicToSites, users, waitReconnectTopic| Constructor and Description |
|---|
ThreadedClient() |
ThreadedClient(int subscribePort) |
ThreadedClient(String subscribeHost,
int subscribePort) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected boolean |
doReconnect(Site site) |
void |
subscribe(String host,
int port,
String tableName,
MessageHandler handler) |
void |
subscribe(String host,
int port,
String tableName,
MessageHandler handler,
boolean reconnect) |
void |
subscribe(String host,
int port,
String tableName,
MessageHandler handler,
long offset) |
void |
subscribe(String host,
int port,
String tableName,
MessageHandler handler,
long offset,
boolean reconnect) |
void |
subscribe(String host,
int port,
String tableName,
MessageHandler handler,
long offset,
boolean reconnect,
String userName,
String password) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
BatchMessageHandler batchMessageHandler,
long offset,
boolean reconnect,
Vector filter,
boolean allowExistTopic,
int batchSize,
float throttle) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
BatchMessageHandler batchMessageHandler,
long offset,
boolean reconnect,
Vector filter,
boolean allowExistTopic,
int batchSize,
float throttle,
String userName,
String passWord) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
BatchMessageHandler batchMessageHandler,
long offset,
boolean reconnect,
Vector filter,
boolean allowExistTopic,
int batchSize,
int throttle) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
BatchMessageHandler batchMessageHandler,
long offset,
boolean reconnect,
Vector filter,
boolean allowExistTopic,
int batchSize,
int throttle,
String userName,
String passWord) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
BatchMessageHandler batchMessageHandler,
long offset,
boolean reconnect,
Vector filter,
StreamDeserializer deserializer,
boolean allowExistTopic,
int batchSize,
float throttle) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
BatchMessageHandler handler,
long offset,
boolean reconnect,
Vector filter,
StreamDeserializer deserializer,
boolean allowExistTopic,
int batchSize,
float throttle,
String userName,
String password) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
BatchMessageHandler handler,
long offset,
boolean reconnect,
Vector filter,
StreamDeserializer deserializer,
boolean allowExistTopic,
int batchSize,
float throttle,
String userName,
String password,
boolean msgAsTable) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
BatchMessageHandler batchMessageHandler,
long offset,
boolean reconnect,
Vector filter,
StreamDeserializer deserializer,
boolean allowExistTopic,
int batchSize,
int throttle) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
BatchMessageHandler handler,
long offset,
boolean reconnect,
Vector filter,
StreamDeserializer deserializer,
boolean allowExistTopic,
int batchSize,
int throttle,
String userName,
String password) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
MessageHandler handler) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
MessageHandler handler,
boolean reconnect) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
MessageHandler handler,
long offset) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
MessageHandler handler,
long offset,
boolean reconnect) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
MessageHandler handler,
long offset,
boolean reconnect,
String userName,
String password) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
MessageHandler handler,
long offset,
boolean reconnect,
Vector filter,
boolean allowExistTopic) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
MessageHandler handler,
long offset,
boolean reconnect,
Vector filter,
boolean allowExistTopic,
int batchSize,
float throttle) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
MessageHandler handler,
long offset,
boolean reconnect,
Vector filter,
boolean allowExistTopic,
int batchSize,
float throttle,
String userName,
String passWord) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
MessageHandler handler,
long offset,
boolean reconnect,
Vector filter,
boolean allowExistTopic,
int batchSize,
int throttle) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
MessageHandler handler,
long offset,
boolean reconnect,
Vector filter,
boolean allowExistTopic,
int batchSize,
int throttle,
String userName,
String passWord) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
MessageHandler handler,
long offset,
boolean reconnect,
Vector filter,
boolean allowExistTopic,
String userName,
String password) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
MessageHandler handler,
long offset,
boolean reconnect,
Vector filter,
StreamDeserializer deserializer) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
MessageHandler handler,
long offset,
boolean reconnect,
Vector filter,
StreamDeserializer deserializer,
boolean allowExistTopic) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
MessageHandler handler,
long offset,
boolean reconnect,
Vector filter,
StreamDeserializer deserializer,
boolean allowExistTopic,
int batchSize,
float throttle) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
MessageHandler handler,
long offset,
boolean reconnect,
Vector filter,
StreamDeserializer deserializer,
boolean allowExistTopic,
int batchSize,
float throttle,
String userName,
String password) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
MessageHandler handler,
long offset,
boolean reconnect,
Vector filter,
StreamDeserializer deserializer,
boolean allowExistTopic,
int batchSize,
int throttle) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
MessageHandler handler,
long offset,
boolean reconnect,
Vector filter,
StreamDeserializer deserializer,
boolean allowExistTopic,
int batchSize,
int throttle,
String userName,
String password) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
MessageHandler handler,
long offset,
boolean reconnect,
Vector filter,
StreamDeserializer deserializer,
boolean allowExistTopic,
int batchSize,
int throttle,
String userName,
String password,
List<String> backupSites) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
MessageHandler handler,
long offset,
boolean reconnect,
Vector filter,
StreamDeserializer deserializer,
boolean allowExistTopic,
int batchSize,
int throttle,
String userName,
String password,
List<String> backupSites,
int resubscribeInterval,
boolean subOnce) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
MessageHandler handler,
long offset,
boolean reconnect,
Vector filter,
StreamDeserializer deserializer,
boolean allowExistTopic,
String userName,
String password) |
protected void |
subscribe(String host,
int port,
String tableName,
String actionName,
MessageHandler handler,
long offset,
boolean reconnect,
Vector filter,
StreamDeserializer deserializer,
boolean allowExistTopic,
String userName,
String password,
boolean createSubInfo)
This internal subscribe method only use for when enable backupSite, try to switch site and subscribe.
|
void |
subscribe(String host,
int port,
String tableName,
String actionName,
MessageHandler handler,
long offset,
Vector filter) |
void |
unsubscribe(String host,
int port,
String tableName) |
void |
unsubscribe(String host,
int port,
String tableName,
String actionName) |
protected void |
unsubscribeInternal(String host,
int port,
String tableName,
String actionName) |
activeCloseConnection, batchDispatch, dispatch, getAllReconnectSites, getAllReconnectTopic, getAllTopicsBySite, getCurrentSiteByName, getNeedReconnect, getReconnectTimestamp, getSiteByName, getSubInfos, getTopicToSites, isClose, isClosed, isRemoteLittleEndian, setMsgId, setNeedReconnect, setReconnectTimestamp, subscribeInternal, subscribeInternal, subscribeInternal, subscribeInternal, subscribeInternal, subscribeInternal, subscribeInternal, subscribeInternal, tryReconnect, unsubscribeInternalpublic ThreadedClient()
throws SocketException
SocketExceptionpublic ThreadedClient(int subscribePort)
throws SocketException
SocketExceptionpublic ThreadedClient(String subscribeHost, int subscribePort) throws SocketException
SocketExceptionprotected boolean doReconnect(Site site)
doReconnect in class AbstractClientpublic void subscribe(String host, int port, String tableName, String actionName, MessageHandler handler, long offset, boolean reconnect, Vector filter, StreamDeserializer deserializer, boolean allowExistTopic, String userName, String password) throws IOException
IOExceptionprotected void subscribe(String host, int port, String tableName, String actionName, MessageHandler handler, long offset, boolean reconnect, Vector filter, StreamDeserializer deserializer, boolean allowExistTopic, String userName, String password, boolean createSubInfo) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, MessageHandler handler, long offset, boolean reconnect, Vector filter, StreamDeserializer deserializer, boolean allowExistTopic, int batchSize, int throttle, String userName, String password) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, MessageHandler handler, long offset, boolean reconnect, Vector filter, StreamDeserializer deserializer, boolean allowExistTopic, int batchSize, int throttle, String userName, String password, List<String> backupSites, int resubscribeInterval, boolean subOnce) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, MessageHandler handler, long offset, boolean reconnect, Vector filter, StreamDeserializer deserializer, boolean allowExistTopic, int batchSize, int throttle, String userName, String password, List<String> backupSites) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, MessageHandler handler, long offset, boolean reconnect, Vector filter, StreamDeserializer deserializer, boolean allowExistTopic, int batchSize, float throttle, String userName, String password) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, BatchMessageHandler handler, long offset, boolean reconnect, Vector filter, StreamDeserializer deserializer, boolean allowExistTopic, int batchSize, float throttle, String userName, String password) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, BatchMessageHandler handler, long offset, boolean reconnect, Vector filter, StreamDeserializer deserializer, boolean allowExistTopic, int batchSize, float throttle, String userName, String password, boolean msgAsTable) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, BatchMessageHandler handler, long offset, boolean reconnect, Vector filter, StreamDeserializer deserializer, boolean allowExistTopic, int batchSize, int throttle, String userName, String password) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, MessageHandler handler, long offset, boolean reconnect, Vector filter, boolean allowExistTopic, String userName, String password) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, BatchMessageHandler batchMessageHandler, long offset, boolean reconnect, Vector filter, StreamDeserializer deserializer, boolean allowExistTopic, int batchSize, float throttle) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, BatchMessageHandler batchMessageHandler, long offset, boolean reconnect, Vector filter, StreamDeserializer deserializer, boolean allowExistTopic, int batchSize, int throttle) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, BatchMessageHandler batchMessageHandler, long offset, boolean reconnect, Vector filter, boolean allowExistTopic, int batchSize, float throttle) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, BatchMessageHandler batchMessageHandler, long offset, boolean reconnect, Vector filter, boolean allowExistTopic, int batchSize, int throttle) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, BatchMessageHandler batchMessageHandler, long offset, boolean reconnect, Vector filter, boolean allowExistTopic, int batchSize, float throttle, String userName, String passWord) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, BatchMessageHandler batchMessageHandler, long offset, boolean reconnect, Vector filter, boolean allowExistTopic, int batchSize, int throttle, String userName, String passWord) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, MessageHandler handler, long offset, boolean reconnect, Vector filter, StreamDeserializer deserializer, boolean allowExistTopic, int batchSize, int throttle) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, MessageHandler handler, long offset, boolean reconnect, Vector filter, StreamDeserializer deserializer, boolean allowExistTopic, int batchSize, float throttle) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, MessageHandler handler, long offset, boolean reconnect, Vector filter, StreamDeserializer deserializer, boolean allowExistTopic) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, MessageHandler handler, long offset, boolean reconnect, Vector filter, boolean allowExistTopic) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, MessageHandler handler, long offset, boolean reconnect, Vector filter, StreamDeserializer deserializer) throws Exception
Exceptionpublic void subscribe(String host, int port, String tableName, String actionName, MessageHandler handler, long offset, boolean reconnect, Vector filter, boolean allowExistTopic, int batchSize, int throttle) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, MessageHandler handler, long offset, boolean reconnect, Vector filter, boolean allowExistTopic, int batchSize, float throttle) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, MessageHandler handler, long offset, boolean reconnect, Vector filter, boolean allowExistTopic, int batchSize, int throttle, String userName, String passWord) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, MessageHandler handler, long offset, boolean reconnect, Vector filter, boolean allowExistTopic, int batchSize, float throttle, String userName, String passWord) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, MessageHandler handler, long offset, boolean reconnect, String userName, String password) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, MessageHandler handler, long offset, boolean reconnect) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, MessageHandler handler, long offset, Vector filter) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, MessageHandler handler, long offset) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, MessageHandler handler) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, String actionName, MessageHandler handler, boolean reconnect) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, MessageHandler handler) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, MessageHandler handler, boolean reconnect) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, MessageHandler handler, long offset) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, MessageHandler handler, long offset, boolean reconnect) throws IOException
IOExceptionpublic void subscribe(String host, int port, String tableName, MessageHandler handler, long offset, boolean reconnect, String userName, String password) throws IOException
IOExceptionpublic void unsubscribe(String host, int port, String tableName, String actionName) throws IOException
IOExceptionpublic void unsubscribe(String host, int port, String tableName) throws IOException
IOExceptionprotected void unsubscribeInternal(String host, int port, String tableName, String actionName) throws IOException
unsubscribeInternal in class AbstractClientIOExceptionpublic void close()
close in class AbstractClientCopyright © 2025 DolphinDB. All rights reserved.