Package com.attivio.connector
Class DataSourceAPIErrorDescriptorImpl
- java.lang.Object
- 
- com.attivio.connector.DataSourceAPIErrorDescriptorImpl
 
- 
- All Implemented Interfaces:
- DataSourceAPIErrorDescriptor
 
 public class DataSourceAPIErrorDescriptorImpl extends java.lang.Object implements DataSourceAPIErrorDescriptor 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface com.attivio.sdk.scanner.DataSourceAPIErrorDescriptorDataSourceAPIErrorDescriptor.LogLevel
 
- 
 - 
Constructor SummaryConstructors Constructor Description DataSourceAPIErrorDescriptorImpl()
 - 
Method SummaryAll Methods Instance Methods Concrete 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()voidsetErrorId(java.lang.String errorId)voidsetErrorMessage(java.lang.String errorMessage)voidsetErrorProperties(java.util.Properties errorProperties)voidsetFatal(boolean fatal)voidsetLogLevel(DataSourceAPIErrorDescriptor.LogLevel logLevel)voidsetNumRetries(int numRetries)voidsetPercentTimeoutIncreaseOnRetry(int percentTimeoutIncreaseOnRetry)voidsetSystemEventSevirity(SystemEvent.Severity systemEventSevirity)
 
- 
- 
- 
Method Detail- 
getPercentTimeoutIncreaseOnRetrypublic int getPercentTimeoutIncreaseOnRetry() Description copied from interface:DataSourceAPIErrorDescriptorHow 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.- Specified by:
- getPercentTimeoutIncreaseOnRetryin interface- DataSourceAPIErrorDescriptor
- Returns:
- value >= 100 (100 means no change in timeout on subsequent attempts).
 
 - 
setPercentTimeoutIncreaseOnRetrypublic void setPercentTimeoutIncreaseOnRetry(int percentTimeoutIncreaseOnRetry) 
 - 
getErrorIdpublic java.lang.String getErrorId() Description copied from interface:DataSourceAPIErrorDescriptorE.g. http-401- Specified by:
- getErrorIdin interface- DataSourceAPIErrorDescriptor
- Returns:
- non blank value
 
 - 
setErrorIdpublic void setErrorId(java.lang.String errorId) 
 - 
isFatalpublic boolean isFatal() - Specified by:
- isFatalin interface- DataSourceAPIErrorDescriptor
- Returns:
- true if this error should stop the scanner
 
 - 
setFatalpublic void setFatal(boolean fatal) 
 - 
getNumRetriespublic int getNumRetries() Description copied from interface:DataSourceAPIErrorDescriptorThe number of times to retry after a failure.- Specified by:
- getNumRetriesin interface- DataSourceAPIErrorDescriptor
- Returns:
- A value < 0 to use the default number of retries
 
 - 
setNumRetriespublic void setNumRetries(int numRetries) 
 - 
getLogLevelpublic DataSourceAPIErrorDescriptor.LogLevel getLogLevel() Description copied from interface:DataSourceAPIErrorDescriptorDefine the logging level. Don't log if null;- Specified by:
- getLogLevelin interface- DataSourceAPIErrorDescriptor
- Returns:
 
 - 
setLogLevelpublic void setLogLevel(DataSourceAPIErrorDescriptor.LogLevel logLevel) 
 - 
getSystemEventSeviritypublic SystemEvent.Severity getSystemEventSevirity() Description copied from interface:DataSourceAPIErrorDescriptorGenerate a system event with the specified severity. Use the text returned fromDataSourceAPIErrorDescriptor.getErrorMessage()as the event's text- Specified by:
- getSystemEventSevirityin interface- DataSourceAPIErrorDescriptor
- Returns:
- null if a system event should not be generated
 
 - 
setSystemEventSeviritypublic void setSystemEventSevirity(SystemEvent.Severity systemEventSevirity) 
 - 
getErrorPropertiespublic java.util.Properties getErrorProperties() - Specified by:
- getErrorPropertiesin interface- DataSourceAPIErrorDescriptor
- Returns:
- additional error properties
 
 - 
setErrorPropertiespublic void setErrorProperties(java.util.Properties errorProperties) 
 - 
getErrorMessagepublic java.lang.String getErrorMessage() Description copied from interface:DataSourceAPIErrorDescriptorThe error message could be used for logging and/or system events. Its form is a String format, e.g. "Failed to fetch doc %s".- Specified by:
- getErrorMessagein interface- DataSourceAPIErrorDescriptor
- Returns:
- null or blank is optional
 
 - 
setErrorMessagepublic void setErrorMessage(java.lang.String errorMessage) 
 
- 
 
-