public class CompositeExecutionListener extends Object implements ExecutionListener
ExecutionListener that forwards all received calls to its child listeners.| Constructor and Description |
|---|
CompositeExecutionListener(ExecutionListener... listeners) |
CompositeExecutionListener(Iterable<ExecutionListener> listeners) |
| Modifier and Type | Method and Description |
|---|---|
void |
onExecutionFailed(BulkExecutionException exception,
ExecutionContext context)
Called when a statement execution has failed.
|
void |
onExecutionStarted(Statement<?> statement,
ExecutionContext context)
Called when a statement is about to be executed.
|
void |
onExecutionSuccessful(Statement<?> statement,
ExecutionContext context)
Called when a statement has been successfully executed.
|
void |
onReadRequestFailed(Statement<?> statement,
Throwable error,
ExecutionContext context)
Called when a read request has failed.
|
void |
onReadRequestStarted(Statement<?> statement,
ExecutionContext context)
Called when a read request is about to be sent.
|
void |
onReadRequestSuccessful(Statement<?> statement,
ExecutionContext context)
Called when a read request has been completed successfully.
|
void |
onRowReceived(Row row,
ExecutionContext context)
Called when a row has been successfully received.
|
void |
onWriteRequestFailed(Statement<?> statement,
Throwable error,
ExecutionContext context)
Called when a write request has failed.
|
void |
onWriteRequestStarted(Statement<?> statement,
ExecutionContext context)
Called when a write request is about to be sent.
|
void |
onWriteRequestSuccessful(Statement<?> statement,
ExecutionContext context)
Called when a write request has been completed successfully.
|
public CompositeExecutionListener(ExecutionListener... listeners)
public CompositeExecutionListener(Iterable<ExecutionListener> listeners)
public void onExecutionStarted(Statement<?> statement, ExecutionContext context)
ExecutionListeneronExecutionStarted in interface ExecutionListenerstatement - the statement to execute.context - the global statement execution context.public void onExecutionSuccessful(Statement<?> statement, ExecutionContext context)
ExecutionListeneronExecutionSuccessful in interface ExecutionListenerstatement - the executed statement.context - the global statement execution context.public void onExecutionFailed(BulkExecutionException exception, ExecutionContext context)
ExecutionListeneronExecutionFailed in interface ExecutionListenerexception - the error encountered.context - the statement execution context.public void onWriteRequestStarted(Statement<?> statement, ExecutionContext context)
ExecutionListeneronWriteRequestStarted in interface ExecutionListenerstatement - the statement to execute.context - the local request execution context.public void onWriteRequestSuccessful(Statement<?> statement, ExecutionContext context)
ExecutionListeneronWriteRequestSuccessful in interface ExecutionListenerstatement - the statement to execute.context - the local request execution context.public void onWriteRequestFailed(Statement<?> statement, Throwable error, ExecutionContext context)
ExecutionListeneronWriteRequestFailed in interface ExecutionListenerstatement - the statement to execute.error - the request execution error.context - the local request execution context.public void onReadRequestStarted(Statement<?> statement, ExecutionContext context)
ExecutionListeneronReadRequestStarted in interface ExecutionListenerstatement - the statement to execute.context - the local request execution context.public void onReadRequestSuccessful(Statement<?> statement, ExecutionContext context)
ExecutionListeneronReadRequestSuccessful in interface ExecutionListenerstatement - the statement to execute.context - the local request execution context.public void onReadRequestFailed(Statement<?> statement, Throwable error, ExecutionContext context)
ExecutionListeneronReadRequestFailed in interface ExecutionListenerstatement - the statement to execute.error - the request execution error.context - the local request execution context.public void onRowReceived(Row row, ExecutionContext context)
ExecutionListenerNote: this method is called when the row is effectively read and emitted to downstream subscribers, which might be later than the moment when it was made available by the driver.
onRowReceived in interface ExecutionListenerrow - the row.context - the local request execution context.Copyright © 2017–2021 DataStax. All rights reserved.