Class LogCleanupAsync

java.lang.Object
cn.sinozg.applet.biz.framework.cleanup.LogCleanupAsync

@Component public class LogCleanupAsync extends Object
用于清理日志表
Since:
2025-07-21 23:43
Author:
xieyubin
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final org.slf4j.Logger
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> void
    logCleanup(String name, int maxRetries, T params, cn.sinozg.applet.common.function.FunctionException<T,Long> del)
    用于清理日志,异步,批量处理

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • log

      private static final org.slf4j.Logger log
  • Constructor Details

    • LogCleanupAsync

      public LogCleanupAsync()
  • Method Details

    • logCleanup

      @Async public <T> void logCleanup(String name, int maxRetries, T params, cn.sinozg.applet.common.function.FunctionException<T,Long> del)
      用于清理日志,异步,批量处理
      Type Parameters:
      T - 参数类型
      Parameters:
      name - 任务名称
      maxRetries - 最大重试次数
      params - 参数
      del - 删除逻辑,需加事物,不要在这层使用事物太大