类 XxlJobHelper

java.lang.Object
com.xxl.job.core.context.XxlJobHelper

public class XxlJobHelper extends Object
helper for xxl-job
作者:
xuxueli 2020-11-05
  • 构造器详细资料

    • XxlJobHelper

      public XxlJobHelper()
  • 方法详细资料

    • getJobId

      public static long getJobId()
      current JobId
      返回:
    • getJobParam

      public static String getJobParam()
      current JobParam
      返回:
    • getJobLogFileName

      public static String getJobLogFileName()
      current JobLogFileName
      返回:
    • getShardIndex

      public static int getShardIndex()
      current ShardIndex
      返回:
    • getShardTotal

      public static int getShardTotal()
      current ShardTotal
      返回:
    • log

      public static boolean log(String appendLogPattern, Object... appendLogArguments)
      append log with pattern
      参数:
      appendLogPattern - like "aaa {} bbb {} ccc"
      appendLogArguments - like "111, true"
    • log

      public static boolean log(Throwable e)
      append exception stack
      参数:
      e -
    • handleSuccess

      public static boolean handleSuccess()
      handle success
      返回:
    • handleSuccess

      public static boolean handleSuccess(String handleMsg)
      handle success with log msg
      参数:
      handleMsg -
      返回:
    • handleFail

      public static boolean handleFail()
      handle fail
      返回:
    • handleFail

      public static boolean handleFail(String handleMsg)
      handle fail with log msg
      参数:
      handleMsg -
      返回:
    • handleTimeout

      public static boolean handleTimeout()
      handle timeout
      返回:
    • handleTimeout

      public static boolean handleTimeout(String handleMsg)
      handle timeout with log msg
      参数:
      handleMsg -
      返回:
    • handleResult

      public static boolean handleResult(int handleCode, String handleMsg)
      参数:
      handleCode - 200 : success 500 : fail 502 : timeout
      handleMsg -
      返回: