com.ibm.commerce.marketing.commands.ranking

Class CleanupRankingPolicyCmdImpl

  • All Implemented Interfaces:
    BusinessPolicyCommand, com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, CleanupRankingPolicyCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    public class CleanupRankingPolicyCmdImpl
    extends AbstractCleanupRankingPolicyCmdImpl
    implements CleanupRankingPolicyCmd
    The CleanupRankingPolicyCmdImpl is an implementation of the CleanupRankingPolicyCmd interface which is used to clean out-of-date statistic data, and to summarize statistic data for product based ranking, like top browsed product ranking or best sellers ranking. The CleanupRankingPolicyCmdImpl command is associated with a ranking policy. If a ranking uses the ranking policy, when Process MarketingTrigger SendTriggers is called to publish the ranking lists, then the method cleanup will be called.

    This command supports the following five parameters. All the parameters are optional. These parameters can be set in the PROPERTIES column of the business policy command in the POLICYCMD database table.

    • CleanupRankingPolicyCmd.PARAM_CLEAN_INTERVAL (CleanInterval): The summary interval. The data created in the interval will be summarized. The summarized data will be deleted, and one summary record will be inserted. The clean interval value is specified in seconds. If this parameter is not set, the default value is 86400 (one day).
    • CleanupRankingPolicyCmd.PARAM_VALID_PERIOD (ValidPeriod): How long will the statistics data be kept in the database. The data created before this period will be deleted. The valid period value is specified in seconds. If this parameter is not set, the default value is 2678400 (31 days).
    • CleanupRankingPolicyCmd.PARAM_CLEAN_MODE (CleanMode): This parameter specifies from when records should be cleaned up.
      • MODE_LAST_DAY (LastDay): clean interval starts from the last day.
      • MODE_LAST_HOUR (LastHour): clean interval starts from last hour.
      • MODE_IMMEDIATE (Immediate): clean interval start from the current time.
      If this parameter is not set, the default value is LastDay.
    • Ranking.PARAM_OBJECT_TYPE (ObjectType): The object type which will be used to query the DMRANKINGSTAT statistic table OBJECT_TYPE column. If this parameter is not set, the default value is 0 (Best Sellers).
    • CleanupRankingPolicyCmdImpl.PARAM_BATCH_SIZE (BatchSize): The number of rows to process in a batch. If this parameter is not set, the default value is 500.
    • CleanupRankingPolicyCmdImpl.PARAM_DMRANKINGSTAT_BATCH_SIZE (BatchSize): The number of rows to process in a batch for the DMRANKINGSTAT table. If this parameter is not set, the default value is 10000.

    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright field.
        See Also:
        Constant Field Values
      • CLASS_NAME

        public static final java.lang.String CLASS_NAME
        Class name.
      • DEFAULT_CLEAN_MODE

        public static final java.lang.String DEFAULT_CLEAN_MODE
        Default clean mode is MODE_LAST_DAY
        See Also:
        Constant Field Values
      • DEFAULT_CLEAN_INTERVAL

        public static final java.lang.String DEFAULT_CLEAN_INTERVAL
        Default clean interval is one day, that is 86400 second.
        See Also:
        Constant Field Values
      • DEFAULT_VALID_PERIOD

        public static final java.lang.String DEFAULT_VALID_PERIOD
        Default valid period is one month, that is 31 days or 2678400 second.
        See Also:
        Constant Field Values
      • DEFAULT_BATCH_SIZE

        public static final java.lang.String DEFAULT_BATCH_SIZE
        Default prepared statement batch size.
        See Also:
        Constant Field Values
      • DEFAULT_PARAM_DMRANKINGSTAT_BATCH_SIZE

        public static final java.lang.String DEFAULT_PARAM_DMRANKINGSTAT_BATCH_SIZE
        Default batch size for DMRANKINGSTAT.
        See Also:
        Constant Field Values
      • DEFAULT_OBJECT_TYPE

        public static final java.lang.Short DEFAULT_OBJECT_TYPE
        Default object type is RankingConstants.RANKING_TYPE_MOST_SOLD
      • PARAM_BATCH_SIZE

        public static final java.lang.String PARAM_BATCH_SIZE
        Constant for parameter batch size.
        See Also:
        Constant Field Values
      • PARAM_DMRANKINGSTAT_BATCH_SIZE

        public static final java.lang.String PARAM_DMRANKINGSTAT_BATCH_SIZE
        Constant for parameter batch size for DMRANKINGSTAT table.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CleanupRankingPolicyCmdImpl

        public CleanupRankingPolicyCmdImpl()