Class DeDuplicationHandlerImpl

java.lang.Object
com.nt.udc.processor.DuplicateProcessor.DeDuplicationHandlerImpl
All Implemented Interfaces:
IDCMethodHandler, DeDuplicationHandler

public class DeDuplicationHandlerImpl extends Object implements DeDuplicationHandler
  • Field Details

    • NO_DUPLICATE

      public static final ShortField NO_DUPLICATE
    • DUPLICATE

      public static final ShortField DUPLICATE
    • TOO_OLD

      public static final ShortField TOO_OLD
    • FUTURE_RECORD

      public static final ShortField FUTURE_RECORD
  • Constructor Details

    • DeDuplicationHandlerImpl

      public DeDuplicationHandlerImpl(TimePartitionManager partitionMgr)
      Default Constructor
      Parameters:
      partitionMgr - The partition manager
  • Method Details

    • isDuplicate

      public ShortField isDuplicate(MillisField timestamp, StringField timezoneID, StringField key) throws Exception
      Determines if the event is a duplicate
      Specified by:
      isDuplicate in interface DeDuplicationHandler
      Parameters:
      timestamp - The timestamp
      timezoneID - The TimeZone ID (i.e. UTC)
      key - The de-duplication key to use
      Returns:
      Code indicating if this event is DUPLICATE, NO_DUPLICATE, or TOO_OLD
      Throws:
      Exception - if any issue occurs while trying to determine if this is a duplicate event
    • isDuplicate

      public ShortField isDuplicate(MillisField timestamp, StringField key) throws Exception
      Determines if the event is a duplicate
      Specified by:
      isDuplicate in interface DeDuplicationHandler
      Parameters:
      timestamp - The timestamp (assumed to be UTC)
      key - The de-duplication key to use
      Returns:
      Code indicating if this event is DUPLICATE, NO_DUPLICATE, or TOO_OLD
      Throws:
      Exception - if any issue occurs while trying to determine if this is a duplicate event