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

  • Creating JSON documents from java classes using gson
  • findViewById (Activity)
  • compareTo (BigDecimal)
  • setRequestProperty (URLConnection)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Table (org.hibernate.mapping)
    A relational table
  • 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