Package net.snowflake.client.loader
Interface LoadResultListener
-
public interface LoadResultListenerCallback API for processing errors and statistics of upload operation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddError(LoadingError error)voidaddErrorCount(int number)Method to add to the error count for a listenervoidaddErrorRecordCount(int number)Method to add to the error record count for a listenervoidaddOperationRecordCount(Operation op, int i)voidaddProcessedRecordCount(Operation op, int i)voidaddSubmittedRowCount(int number)Adds the number of submitted rowsintgetErrorCount()method to get the total number of errorsintgetErrorRecordCount()method to get the total number of error recordsintgetSubmittedRowCount()Gets the number of submitted rowbooleanneedErrors()booleanneedSuccessRecords()voidrecordProvided(Operation op, Object[] record)voidresetErrorCount()Method to reset the error count back to zerovoidresetErrorRecordCount()Method to reset the errorRecordCount back to zerovoidresetSubmittedRowCount()Resets submitted row countbooleanthrowOnError()
-
-
-
Method Detail
-
needSuccessRecords
boolean needSuccessRecords()
- Returns:
- this result listener needs to listen to the provided records
-
recordProvided
void recordProvided(Operation op, Object[] record)
- Parameters:
op- Operation requestedrecord- Data submitted for processing
-
addProcessedRecordCount
void addProcessedRecordCount(Operation op, int i)
- Parameters:
op- Operation requestedi- number of rows that had been processed
-
addOperationRecordCount
void addOperationRecordCount(Operation op, int i)
- Parameters:
op- Operation requestedi- number of rows that had been affected by a given operation
-
needErrors
boolean needErrors()
- Returns:
- whether this result listener needs to listen to error records
-
addError
void addError(LoadingError error)
- Parameters:
error- information about error that was encountered
-
throwOnError
boolean throwOnError()
- Returns:
- Whether to throw an exception upon encountering error
-
addErrorCount
void addErrorCount(int number)
Method to add to the error count for a listener- Parameters:
number- the number of errors
-
resetErrorCount
void resetErrorCount()
Method to reset the error count back to zero
-
getErrorCount
int getErrorCount()
method to get the total number of errors- Returns:
- the number of errors
-
addErrorRecordCount
void addErrorRecordCount(int number)
Method to add to the error record count for a listener- Parameters:
number- the number of error records
-
resetErrorRecordCount
void resetErrorRecordCount()
Method to reset the errorRecordCount back to zero
-
getErrorRecordCount
int getErrorRecordCount()
method to get the total number of error records- Returns:
- the number of rows in errors
-
resetSubmittedRowCount
void resetSubmittedRowCount()
Resets submitted row count
-
addSubmittedRowCount
void addSubmittedRowCount(int number)
Adds the number of submitted rows- Parameters:
number- the number of submitted row
-
getSubmittedRowCount
int getSubmittedRowCount()
Gets the number of submitted row- Returns:
- the number of submitted row
-
-