Tabnine Logo
ShardingUtil$ShardingVO
Code IndexAdd Tabnine to your IDE (free)

How to use
ShardingUtil$ShardingVO
in
com.xxl.job.core.util

Best Java code snippets using com.xxl.job.core.util.ShardingUtil$ShardingVO (Showing top 6 results out of 315)

origin: xuxueli/xxl-job

String[] scriptParams = new String[3];
scriptParams[0] = param;
scriptParams[1] = String.valueOf(shardingVO.getIndex());
scriptParams[2] = String.valueOf(shardingVO.getTotal());
origin: xuxueli/xxl-job

ShardingUtil.setShardingVo(new ShardingUtil.ShardingVO(triggerParam.getBroadcastIndex(), triggerParam.getBroadcastTotal()));
origin: com.xuxueli/xxl-job-core

ShardingUtil.setShardingVo(new ShardingUtil.ShardingVO(triggerParam.getBroadcastIndex(), triggerParam.getBroadcastTotal()));
origin: com.xuxueli/xxl-job-core

String[] scriptParams = new String[3];
scriptParams[0] = param;
scriptParams[1] = String.valueOf(shardingVO.getIndex());
scriptParams[2] = String.valueOf(shardingVO.getTotal());
origin: xuxueli/xxl-job

@Override
public ReturnT<String> execute(String param) throws Exception {
  // 分片参数
  ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
  XxlJobLogger.log("分片参数:当前分片序号 = {}, 总分片数 = {}", shardingVO.getIndex(), shardingVO.getTotal());
  // 业务逻辑
  for (int i = 0; i < shardingVO.getTotal(); i++) {
    if (i == shardingVO.getIndex()) {
      XxlJobLogger.log("第 {} 片, 命中分片开始处理", i);
    } else {
      XxlJobLogger.log("第 {} 片, 忽略", i);
    }
  }
  return SUCCESS;
}

origin: xuxueli/xxl-job

@Override
public ReturnT<String> execute(String param) throws Exception {
  // 分片参数
  ShardingUtil.ShardingVO shardingVO = ShardingUtil.getShardingVo();
  XxlJobLogger.log("分片参数:当前分片序号 = {}, 总分片数 = {}", shardingVO.getIndex(), shardingVO.getTotal());
  // 业务逻辑
  for (int i = 0; i < shardingVO.getTotal(); i++) {
    if (i == shardingVO.getIndex()) {
      XxlJobLogger.log("第 {} 片, 命中分片开始处理", i);
    } else {
      XxlJobLogger.log("第 {} 片, 忽略", i);
    }
  }
  return SUCCESS;
}
com.xxl.job.core.utilShardingUtil$ShardingVO

Most used methods

  • getIndex
  • getTotal
  • <init>

Popular in Java

  • Finding current android device location
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • requestLocationUpdates (LocationManager)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • BoxLayout (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now