public class ThreadPooledClient extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
DEFAULT_ACTION_NAME |
protected static String |
DEFAULT_HOST |
protected static int |
DEFAULT_PORT |
protected HashMap<String,Boolean> |
hostEndian |
protected int |
listeningPort |
protected HashMap<String,List<IMessage>> |
messageCache |
protected Thread |
pThread |
protected com.xxdb.streaming.client.QueueManager |
queueManager |
protected HashMap<String,String> |
tableNameToTopic |
protected HashMap<String,com.xxdb.streaming.client.AbstractClient.Site> |
topicToSite |
| Constructor and Description |
|---|
ThreadPooledClient() |
ThreadPooledClient(int subscribePort,
int threadCount) |
| Modifier and Type | Method and Description |
|---|---|
void |
batchDispatch(List<IMessage> messags) |
void |
dispatch(IMessage msg) |
protected void |
doReconnect(com.xxdb.streaming.client.AbstractClient.Site site) |
boolean |
isClosed(String topic) |
boolean |
isRemoteLittleEndian(String host) |
void |
setMsgId(String topic,
long msgId) |
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,
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,
Vector filter) |
void |
subscribe(String host,
int port,
String tableName,
String actionName,
MessageHandler handler,
long offset,
Vector filter) |
protected BlockingQueue<List<IMessage>> |
subscribeInternal(String host,
int port,
String tableName,
long offset) |
protected BlockingQueue<List<IMessage>> |
subscribeInternal(String host,
int port,
String tableName,
String actionName,
long offset) |
protected BlockingQueue<List<IMessage>> |
subscribeInternal(String host,
int port,
String tableName,
String actionName,
long offset,
boolean reconnect) |
protected BlockingQueue<List<IMessage>> |
subscribeInternal(String host,
int port,
String tableName,
String actionName,
MessageHandler handler,
long offset,
boolean reconnect,
Vector filter) |
void |
tryReconnect(String topic) |
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) |
protected void |
unsubscribeInternal(String host,
int port,
String tableName,
String actionName) |
protected static final int DEFAULT_PORT
protected static final String DEFAULT_HOST
protected static final String DEFAULT_ACTION_NAME
protected int listeningPort
protected com.xxdb.streaming.client.QueueManager queueManager
protected Thread pThread
public ThreadPooledClient()
throws SocketException
SocketExceptionpublic ThreadPooledClient(int subscribePort,
int threadCount)
throws SocketException
SocketExceptionprotected void doReconnect(com.xxdb.streaming.client.AbstractClient.Site site)
public void subscribe(String host, int port, String tableName, String actionName, MessageHandler handler, long offset, boolean reconnect, Vector filter) 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 unsubscribe(String host, int port, String tableName, String actionName) throws IOException
IOExceptionpublic void unsubscribe(String host, int port, String tableName) throws IOException
IOExceptionpublic void setMsgId(String topic, long msgId)
public void tryReconnect(String topic)
public void dispatch(IMessage msg)
public boolean isRemoteLittleEndian(String host)
public boolean isClosed(String topic)
protected BlockingQueue<List<IMessage>> subscribeInternal(String host, int port, String tableName, String actionName, MessageHandler handler, long offset, boolean reconnect, Vector filter) throws IOException, RuntimeException
IOExceptionRuntimeExceptionprotected BlockingQueue<List<IMessage>> subscribeInternal(String host, int port, String tableName, String actionName, long offset, boolean reconnect) throws IOException, RuntimeException
IOExceptionRuntimeExceptionprotected BlockingQueue<List<IMessage>> subscribeInternal(String host, int port, String tableName, long offset) throws IOException, RuntimeException
IOExceptionRuntimeExceptionprotected BlockingQueue<List<IMessage>> subscribeInternal(String host, int port, String tableName, String actionName, long offset) throws IOException, RuntimeException
IOExceptionRuntimeExceptionprotected void unsubscribeInternal(String host, int port, String tableName, String actionName) throws IOException
IOExceptionprotected void unsubscribeInternal(String host, int port, String tableName) throws IOException
IOExceptionCopyright © 2019 DolphinDB. All rights reserved.