public static class EmbeddedEngine.CompletionResult extends Object implements EmbeddedEngine.CompletionCallback
Constructor and Description |
---|
CompletionResult() |
CompletionResult(EmbeddedEngine.CompletionCallback delegate) |
Modifier and Type | Method and Description |
---|---|
void |
await()
Causes the current thread to wait until the
completion occurs
or until the thread is interrupted. |
boolean |
await(long timeout,
TimeUnit unit)
Causes the current thread to wait until the
completion occurs ,
unless the thread is interrupted, or the specified waiting time elapses. |
Throwable |
error()
Get the completion error, if there is one.
|
void |
handle(boolean success,
String message,
Throwable error) |
boolean |
hasCompleted()
Determine if the connector has completed.
|
boolean |
hasError()
Determine if there is a completion error.
|
String |
message()
Get the completion message.
|
boolean |
success()
Get whether the connector completed normally.
|
public CompletionResult()
public CompletionResult(EmbeddedEngine.CompletionCallback delegate)
public void handle(boolean success, String message, Throwable error)
handle
in interface io.debezium.engine.DebeziumEngine.CompletionCallback
public void await() throws InterruptedException
completion occurs
or until the thread is interrupted.
This method returns immediately if the connector has completed already.
InterruptedException
- if the current thread is interrupted while waitingpublic boolean await(long timeout, TimeUnit unit) throws InterruptedException
completion occurs
,
unless the thread is interrupted, or the specified waiting time elapses.
This method returns immediately if the connector has completed already.
timeout
- the maximum time to waitunit
- the time unit of the timeout
argumenttrue
if the completion was received, or false
if the waiting time elapsed before the completion
was received.InterruptedException
- if the current thread is interrupted while waitingpublic boolean hasCompleted()
true
if the connector has completed, or false
if the connector is still running and this
callback has not yet been notified
public boolean success()
true
if the connector completed normally, or false
if the connector produced an error that
prevented startup or premature termination (or the connector has not yet completed
)public String message()
completed
public Throwable error()
completed
public boolean hasError()
true
if there is a completion error
, or false
if there is no error or
the connector has not yet completed
Copyright © 2022. All rights reserved.