@InterfaceAudience.Public @InterfaceStability.Stable public abstract class PushSource<T> extends Object implements Source<T>
| Constructor and Description |
|---|
PushSource() |
| Modifier and Type | Method and Description |
|---|---|
void |
consume(Record<T> record)
Attach a consumer function to this Source.
|
int |
getQueueLength()
Get length of the queue that records are push onto
Users can override this method to customize the queue length
|
abstract void |
open(Map<String,Object> config,
SourceContext sourceContext)
Open connector with configuration.
|
Record<T> |
read()
Reads the next message from source.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclosepublic Record<T> read() throws Exception
Sourcepublic abstract void open(Map<String,Object> config, SourceContext sourceContext) throws Exception
public void consume(Record<T> record)
record - next message from source which should be sent to a Pulsar topicpublic int getQueueLength()
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.