Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
protected org.apache.pulsar.client.impl.conf.ClientConfigurationData |
clientConf |
protected boolean |
closed |
protected PulsarDeserializationSchema<T> |
deserializer |
protected ExceptionProxy |
exceptionProxy |
protected boolean |
excludeMessageId |
protected PulsarFetcher<T> |
owner |
protected int |
pollTimeoutMs |
protected org.apache.pulsar.client.api.Reader<T> |
reader |
protected Map<String,Object> |
readerConf |
protected boolean |
running |
protected org.apache.pulsar.client.api.MessageId |
startMessageId |
protected PulsarTopicState<T> |
state |
protected TopicRange |
topicRange |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
ReaderThread(PulsarFetcher<T> owner,
PulsarTopicState state,
org.apache.pulsar.client.impl.conf.ClientConfigurationData clientConf,
Map<String,Object> readerConf,
PulsarDeserializationSchema<T> deserializer,
int pollTimeoutMs,
ExceptionProxy exceptionProxy) |
ReaderThread(PulsarFetcher<T> owner,
PulsarTopicState state,
org.apache.pulsar.client.impl.conf.ClientConfigurationData clientConf,
Map<String,Object> readerConf,
PulsarDeserializationSchema<T> deserializer,
int pollTimeoutMs,
ExceptionProxy exceptionProxy,
boolean failOnDataLoss,
boolean useEarliestWhenDataLoss,
boolean excludeMessageId) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel() |
void |
close() |
protected void |
createActualReader() |
protected void |
emitRecord(org.apache.pulsar.client.api.Message<T> message) |
protected void |
handleTooLargeCursor() |
boolean |
isRunning() |
static boolean |
messageIdRoughEquals(org.apache.pulsar.client.api.MessageId l,
org.apache.pulsar.client.api.MessageId r)
used to check whether starting position and current message we got actually are equal
we neglect the potential batchIdx deliberately while seeking to MessageIdImpl for batch entry.
|
void |
run() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldprotected final PulsarFetcher<T> owner
protected final PulsarTopicState<T> state
protected final org.apache.pulsar.client.impl.conf.ClientConfigurationData clientConf
protected final int pollTimeoutMs
protected final ExceptionProxy exceptionProxy
protected final TopicRange topicRange
protected org.apache.pulsar.client.api.MessageId startMessageId
protected boolean excludeMessageId
protected volatile boolean running
protected volatile boolean closed
protected final PulsarDeserializationSchema<T> deserializer
protected volatile org.apache.pulsar.client.api.Reader<T> reader
public ReaderThread(PulsarFetcher<T> owner, PulsarTopicState state, org.apache.pulsar.client.impl.conf.ClientConfigurationData clientConf, Map<String,Object> readerConf, PulsarDeserializationSchema<T> deserializer, int pollTimeoutMs, ExceptionProxy exceptionProxy)
public ReaderThread(PulsarFetcher<T> owner, PulsarTopicState state, org.apache.pulsar.client.impl.conf.ClientConfigurationData clientConf, Map<String,Object> readerConf, PulsarDeserializationSchema<T> deserializer, int pollTimeoutMs, ExceptionProxy exceptionProxy, boolean failOnDataLoss, boolean useEarliestWhenDataLoss, boolean excludeMessageId)
protected void createActualReader()
throws org.apache.pulsar.client.api.PulsarClientException
org.apache.pulsar.client.api.PulsarClientExceptionprotected void handleTooLargeCursor()
protected void emitRecord(org.apache.pulsar.client.api.Message<T> message) throws IOException
IOExceptionpublic void cancel()
throws IOException
IOExceptionpublic void close()
throws IOException
IOExceptionpublic boolean isRunning()
public static boolean messageIdRoughEquals(org.apache.pulsar.client.api.MessageId l,
org.apache.pulsar.client.api.MessageId r)
Copyright © 2019–2022 The Apache Software Foundation. All rights reserved.