public class PollingClient 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 |
|---|
PollingClient(int subscribePort) |
| 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) |
TopicPoller |
subscribe(String host,
int port,
String tableName) |
TopicPoller |
subscribe(String host,
int port,
String tableName,
boolean reconnect) |
TopicPoller |
subscribe(String host,
int port,
String tableName,
long offset) |
TopicPoller |
subscribe(String host,
int port,
String tableName,
long offset,
boolean reconnect) |
TopicPoller |
subscribe(String host,
int port,
String tableName,
String actionName) |
TopicPoller |
subscribe(String host,
int port,
String tableName,
String actionName,
boolean reconnect) |
TopicPoller |
subscribe(String host,
int port,
String tableName,
String actionName,
long offset) |
TopicPoller |
subscribe(String host,
int port,
String tableName,
String actionName,
long offset,
boolean reconnect) |
TopicPoller |
subscribe(String host,
int port,
String tableName,
String actionName,
long offset,
boolean reconnect,
Vector filter) |
TopicPoller |
subscribe(String host,
int port,
String tableName,
String actionName,
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 PollingClient(int subscribePort)
throws SocketException
SocketExceptionprotected void doReconnect(com.xxdb.streaming.client.AbstractClient.Site site)
public TopicPoller subscribe(String host, int port, String tableName, String actionName, long offset, boolean reconnect, Vector filter) throws IOException
IOExceptionpublic TopicPoller subscribe(String host, int port, String tableName, String actionName, long offset, boolean reconnect) throws IOException
IOExceptionpublic TopicPoller subscribe(String host, int port, String tableName, String actionName, long offset, Vector filter) throws IOException
IOExceptionpublic TopicPoller subscribe(String host, int port, String tableName, String actionName, long offset) throws IOException
IOExceptionpublic TopicPoller subscribe(String host, int port, String tableName, long offset) throws IOException
IOExceptionpublic TopicPoller subscribe(String host, int port, String tableName, long offset, boolean reconnect) throws IOException
IOExceptionpublic TopicPoller subscribe(String host, int port, String tableName) throws IOException
IOExceptionpublic TopicPoller subscribe(String host, int port, String tableName, boolean reconnect) throws IOException
IOExceptionpublic TopicPoller subscribe(String host, int port, String tableName, String actionName) throws IOException
IOExceptionpublic TopicPoller subscribe(String host, int port, String tableName, String actionName, 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.