I - Input type.O - Transformed output type.public class DisruptorMessageQueue<I,O> extends Object implements HoodieMessageQueue<I,O>
HoodieMessageQueue based on Disruptor Queue.| Constructor and Description |
|---|
DisruptorMessageQueue(int bufferSize,
Function<I,O> transformFunction,
String waitStrategyId,
int totalProducers,
Runnable preExecuteRunnable) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Shuts down the queue, cleaning up the resources
|
Throwable |
getThrowable() |
void |
insertRecord(I value)
Insert a record into inner message queue.
|
boolean |
isEmpty() |
void |
markAsFailed(Throwable e)
API to allow producers and consumer to communicate termination due to failure.
|
Option<O> |
readNextRecord()
Read records from inner message queue.
|
void |
seal()
Seals the queue (for writing) preventing new records to be enqueued
|
protected void |
setHandlers(HoodieConsumer<O,?> consumer) |
long |
size()
Returns the number of elements in this queue.
|
protected void |
start() |
public long size()
HoodieMessageQueuesize in interface HoodieMessageQueue<I,O>public void insertRecord(I value) throws Exception
HoodieMessageQueueinsertRecord in interface HoodieMessageQueue<I,O>Exceptionpublic Option<O> readNextRecord()
HoodieMessageQueuereadNextRecord in interface HoodieMessageQueue<I,O>public void markAsFailed(Throwable e)
HoodieMessageQueuemarkAsFailed in interface HoodieMessageQueue<I,O>public Throwable getThrowable()
getThrowable in interface HoodieMessageQueue<I,O>public boolean isEmpty()
isEmpty in interface HoodieMessageQueue<I,O>public void seal()
HoodieMessageQueueseal in interface HoodieMessageQueue<I,O>public void close()
HoodieMessageQueueclose in interface Closeableclose in interface AutoCloseableclose in interface HoodieMessageQueue<I,O>protected void setHandlers(HoodieConsumer<O,?> consumer)
protected void start()
Copyright © 2024 The Apache Software Foundation. All rights reserved.