public class SNSLogWriter extends AbstractLogWriter<SNSWriterConfig,SNSWriterStatistics>
| Modifier and Type | Field and Description |
|---|---|
protected RetryManager2 |
createRetry |
protected RetryManager2 |
describeRetry |
protected Duration |
describeTimeout |
config, logger, stats| Constructor and Description |
|---|
SNSLogWriter(SNSWriterConfig config,
SNSWriterStatistics stats,
InternalLogger logger,
SNSFacade facade) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
effectiveSize(LogMessage message)
Calculates the effective size of the message.
|
protected boolean |
ensureDestinationAvailable()
Verifies that the logging destination is available (which may involve
creating it).
|
int |
maxMessageSize()
Returns the maximum allowed UTF-8 message size for the destination.
|
protected List<LogMessage> |
sendBatch(List<LogMessage> currentBatch)
Sends a batch of messages.
|
protected void |
stopAWSClient()
This is called when the logwriter is stopped, to explicitly close the
AWS service client.
|
protected boolean |
withinServiceLimits(int batchBytes,
int numMessages)
Determines whether the provided batch size or number of messages would
exceed the service's limits.
|
addMessage, buildBatch, getBatchCount, getBatchDelay, initialize, isRunning, isSynchronous, keepRunning, processBatch, reportError, run, setBatchDelay, setDiscardAction, setDiscardThreshold, stop, waitUntilInitialized, waitUntilStoppedprotected Duration describeTimeout
protected RetryManager2 describeRetry
protected RetryManager2 createRetry
public SNSLogWriter(SNSWriterConfig config, SNSWriterStatistics stats, InternalLogger logger, SNSFacade facade)
public int maxMessageSize()
LogWriterprotected boolean ensureDestinationAvailable()
AbstractLogWritertrue if successful, false
if not (which will cause the appender to stop running).ensureDestinationAvailable in class AbstractLogWriter<SNSWriterConfig,SNSWriterStatistics>protected List<LogMessage> sendBatch(List<LogMessage> currentBatch)
AbstractLogWritersendBatch in class AbstractLogWriter<SNSWriterConfig,SNSWriterStatistics>protected int effectiveSize(LogMessage message)
AbstractLogWritereffectiveSize in class AbstractLogWriter<SNSWriterConfig,SNSWriterStatistics>protected boolean withinServiceLimits(int batchBytes,
int numMessages)
AbstractLogWriterwithinServiceLimits in class AbstractLogWriter<SNSWriterConfig,SNSWriterStatistics>protected void stopAWSClient()
AbstractLogWriterstopAWSClient in class AbstractLogWriter<SNSWriterConfig,SNSWriterStatistics>Copyright © 2023. All rights reserved.