Package com.attivio.sdk.scanner
Interface DataSourceAPIErrorDescriptor
- 
- All Known Implementing Classes:
- DataSourceAPIErrorDescriptorImpl
 
 public interface DataSourceAPIErrorDescriptorDefines how to handle an error from calls to the underlying data source. Note that the same error could be defined many time to allow different processing in different contexts. For example, "http-401" and "http-401-retry" - we might want to log an error only after retry failed.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static classDataSourceAPIErrorDescriptor.LogLevel
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetErrorId()E.g.java.lang.StringgetErrorMessage()The error message could be used for logging and/or system events.java.util.PropertiesgetErrorProperties()DataSourceAPIErrorDescriptor.LogLevelgetLogLevel()Define the logging level.intgetNumRetries()The number of times to retry after a failure.intgetPercentTimeoutIncreaseOnRetry()How much to increase the timeout period on each retry.SystemEvent.SeveritygetSystemEventSevirity()Generate a system event with the specified severity.booleanisFatal()
 
- 
- 
- 
Method Detail- 
getErrorIdjava.lang.String getErrorId() E.g. http-401- Returns:
- non blank value
 
 - 
getErrorMessagejava.lang.String getErrorMessage() The error message could be used for logging and/or system events. Its form is a String format, e.g. "Failed to fetch doc %s".- Returns:
- null or blank is optional
 
 - 
isFatalboolean isFatal() - Returns:
- true if this error should stop the scanner
 
 - 
getNumRetriesint getNumRetries() The number of times to retry after a failure.- Returns:
- A value < 0 to use the default number of retries
 
 - 
getPercentTimeoutIncreaseOnRetryint getPercentTimeoutIncreaseOnRetry() How much to increase the timeout period on each retry. For example, if 150% and timeout for the first attempt is 8 seconds: The timeout for the second attempt will be 12 seconds and for the third attempt will be 18 seconds.- Returns:
- value >= 100 (100 means no change in timeout on subsequent attempts).
 
 - 
getLogLevelDataSourceAPIErrorDescriptor.LogLevel getLogLevel() Define the logging level. Don't log if null;- Returns:
 
 - 
getSystemEventSeviritySystemEvent.Severity getSystemEventSevirity() Generate a system event with the specified severity. Use the text returned fromgetErrorMessage()as the event's text- Returns:
- null if a system event should not be generated
 
 - 
getErrorPropertiesjava.util.Properties getErrorProperties() - Returns:
- additional error properties
 
 
- 
 
-