use of com.amazonaws.services.qldb.model.CancelJournalKinesisStreamRequest in project amazon-qldb-dmv-sample-java by aws-samples.
the class StreamJournal method cancelQldbStream.
/**
* Cancel the QLDB stream.
*/
public static void cancelQldbStream() {
if (null == streamId) {
return;
}
try {
CancelJournalKinesisStreamRequest request = new CancelJournalKinesisStreamRequest().withLedgerName(ledgerName).withStreamId(streamId);
qldb.cancelJournalKinesisStream(request);
log.info("QLDB stream was cancelled.");
} catch (com.amazonaws.services.qldb.model.ResourceNotFoundException ex) {
log.info("No QLDB stream to cancel.");
} catch (Exception ex) {
log.warn("Error cancelling QLDB stream.", ex);
}
}
Aggregations