public class SNSLogWriter extends AbstractLogWriter
| Modifier and Type | Field and Description |
|---|---|
protected com.amazonaws.services.sns.AmazonSNS |
client |
protected SNSWriterConfig |
config |
protected String |
topicArn |
| Constructor and Description |
|---|
SNSLogWriter(SNSWriterConfig config,
SNSAppenderStatistics stats) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createAWSClient()
Creates the appropriate AWS client.
|
protected int |
effectiveSize(LogMessage message)
Calculates the effective size of the message.
|
protected boolean |
ensureDestinationAvailable()
Verifies that the logging destination is available, including creating
it if not.
|
protected List<LogMessage> |
processBatch(List<LogMessage> currentBatch)
Processes a batch of messages.
|
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, getClientFactoryUsed, initializationFailure, isInitializationComplete, run, setBatchDelay, setDiscardAction, setDiscardThreshold, stop, tryClientFactory, tryConfigureEndpointOrRegionprotected SNSWriterConfig config
protected com.amazonaws.services.sns.AmazonSNS client
protected String topicArn
public SNSLogWriter(SNSWriterConfig config, SNSAppenderStatistics stats)
protected void createAWSClient()
AbstractLogWritercreateAWSClient in class AbstractLogWriterprotected boolean ensureDestinationAvailable()
AbstractLogWritertrue if successful, false
if not (which will cause the appender to stop running).ensureDestinationAvailable in class AbstractLogWriterprotected List<LogMessage> processBatch(List<LogMessage> currentBatch)
AbstractLogWriterprocessBatch in class AbstractLogWriterprotected int effectiveSize(LogMessage message)
AbstractLogWritereffectiveSize in class AbstractLogWriterprotected boolean withinServiceLimits(int batchBytes,
int numMessages)
AbstractLogWriterwithinServiceLimits in class AbstractLogWriterCopyright © 2018. All rights reserved.