Package com.qfs.desc

Interface IDuplicateKeyHandler

    • Method Detail

      • selectDuplicateKeyWithinTransaction

        default IRecordReader selectDuplicateKeyWithinTransaction​(IRecordReader duplicateRecord,
                                                                  IRecordReader previousRecord,
                                                                  IStoreMetadata storeMetadata,
                                                                  IDictionaryProvider dictionaryProvider,
                                                                  int[] uniqueIndexFields,
                                                                  int partitionId)
        Defines what should be added in the datastore when a duplicateRecord in the current transaction has the same key as a previousRecord also in the current transaction.
        Parameters:
        duplicateRecord - The new record that has the same key as the previous record.
        previousRecord - The record registered in the datastore that has the same key as the duplicate record.
        storeMetadata - The store on which the duplication happened.
        dictionaryProvider - The dictionary provider for the store.
        uniqueIndexFields - The id of the fields of the unique index on which we caught a duplicate key event.
        partitionId - The ID of the partition on which the records are.
        Returns:
        The record that will be added in the datastore, or null if the datastore should not be altered.
      • selectDuplicateKeyInDatastore

        IRecordReader selectDuplicateKeyInDatastore​(IRecordReader duplicateRecord,
                                                    IRecordReader previousRecord,
                                                    IStoreMetadata storeMetadata,
                                                    IDictionaryProvider dictionaryProvider,
                                                    int[] uniqueIndexFields,
                                                    int partitionId)
        Defines what should be added in the datastore when a duplicateRecord in the current transaction has the same key as a previousRecord already registered in the datastore. If nothing should be added (that means, keep previousRecord), then null should be returned..
        Parameters:
        duplicateRecord - The new record that has the same key as the previous record.
        previousRecord - The record registered in the datastore that has the same key as the duplicate record.
        storeMetadata - The store on which the duplication happened.
        dictionaryProvider - The dictionary provider for the store.
        uniqueIndexFields - The id of the fields of the unique index on which we caught a duplicate key event.
        partitionId - The ID of the partition on which the records are.
        Returns:
        The record that will be added in the datastore, or null if the datastore should not be altered.