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

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

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

origin: xuxueli/xxl-job

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

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$ShardingVOgetTotal

Popular methods of ShardingUtil$ShardingVO

  • getIndex
  • <init>

Popular in Java

  • Reactive rest calls using spring rest template
  • findViewById (Activity)
  • onCreateOptionsMenu (Activity)
  • onRequestPermissionsResult (Fragment)
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top Vim plugins
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