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 String |
localIP |
protected HashMap<String,List<IMessage>> |
messageCache |
protected Thread |
pThread |
protected com.xxdb.streaming.client.QueueManager |
queueManager |
protected HashMap<String,String> |
tableName2Topic |
| Constructor and Description |
|---|
ThreadPooledClient() |
ThreadPooledClient(int subscribePort,
int threadCount) |
| Modifier and Type | Method and Description |
|---|---|
void |
batchDispatch(List<IMessage> messags) |
void |
dispatch(IMessage msg) |
boolean |
isRemoteLittleEndian(String host) |
void |
subscribe(String host,
int port,
String tableName,
MessageHandler handler) |
void |
subscribe(String host,
int port,
String tableName,
MessageHandler handler,
long offset) |
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 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 String localIP
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
SocketExceptionpublic 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) throws IOException
IOExceptionpublic void dispatch(IMessage msg)
public boolean isRemoteLittleEndian(String host)
protected BlockingQueue<List<IMessage>> subscribeInternal(String host, int port, String tableName, String actionName, long offset) throws IOException, RuntimeException
IOExceptionRuntimeExceptionprotected BlockingQueue<List<IMessage>> subscribeInternal(String host, int port, String tableName, 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.