Package | Description |
---|---|
com.yahoo.bullet.pubsub | |
com.yahoo.bullet.pubsub.rest |
Modifier and Type | Method and Description |
---|---|
static PubSubException |
PubSubException.forArgument(String name,
Throwable cause)
Method to create a PubSubException when a required argument could not be read.
|
Modifier and Type | Method and Description |
---|---|
static PubSub |
PubSub.from(BulletConfig config)
Create a PubSub instance using the class specified in the config file.
|
protected abstract List<PubSubMessage> |
BufferingSubscriber.getMessages()
Implement this method to read and return a
List of PubSubMessage from your actual PubSub source. |
abstract Publisher |
PubSub.getPublisher()
Get a
Publisher instance wired to write to all allocated partitions in the appropriate queue (See
PubSub.context ). |
abstract List<Publisher> |
PubSub.getPublishers(int n)
Get a list of n
Publisher instances with the allocated partitions in the appropriate queue
(See PubSub.context ) split as evenly as possible among them. |
<T> T |
PubSub.getRequiredConfig(Class<T> clazz,
String name)
A method to get a required configuration of a particular type.
|
abstract Subscriber |
PubSub.getSubscriber()
Get a
Subscriber instance wired to read from all allocated partitions in the appropriate queue (See
PubSub.context ). |
abstract List<Subscriber> |
PubSub.getSubscribers(int n)
Get a list of n
Subscriber instances with allocated partitions from the appropriate queue
(See PubSub.context ) split as evenly as possible among them. |
protected boolean |
BufferingSubscriber.haveMessages()
Returns true if we already have messages to emit or if
BufferingSubscriber.getMessages() returns non-null
and non-empty List of messages. |
PubSubMessage |
Subscriber.receive()
Gets a new
PubSubMessage from the assigned partition/partitions (Here a partition is a unit of
parallelism in the Pub/Sub queue, See PubSub ). |
PubSubMessage |
BufferingSubscriber.receive() |
PubSubMessage |
Publisher.send(PubSubMessage message)
Sends a
PubSubMessage . |
default PubSubMessage |
Publisher.send(String id,
byte[] content)
Send a message with an ID and content.
|
void |
PubSub.switchContext(PubSub.Context context,
BulletConfig config)
Use this method to switch the
PubSub.Context to another one. |
Constructor and Description |
---|
PubSub(BulletConfig config)
Instantiate a PubSub using parameters from
BulletConfig . |
Constructor and Description |
---|
RESTPubSub(BulletConfig config)
Create a RESTPubSub from a
BulletConfig . |
Copyright © 2021. All rights reserved.