From efdb99f8cecc4afb592afad79c761081d5d5cf22 Mon Sep 17 00:00:00 2001 From: lee <4766465@qq.com> Date: Wed, 18 Dec 2024 13:27:00 +0800 Subject: [PATCH] init --- xxl-job/xxl-job-core/src/main/java/com/xxl/job/core/util/ShardingUtil.java | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 46 insertions(+), 0 deletions(-) diff --git a/xxl-job/xxl-job-core/src/main/java/com/xxl/job/core/util/ShardingUtil.java b/xxl-job/xxl-job-core/src/main/java/com/xxl/job/core/util/ShardingUtil.java new file mode 100644 index 0000000..7671668 --- /dev/null +++ b/xxl-job/xxl-job-core/src/main/java/com/xxl/job/core/util/ShardingUtil.java @@ -0,0 +1,46 @@ +//package com.xxl.job.core.util; +// +///** +// * sharding vo +// * @author xuxueli 2017-07-25 21:26:38 +// */ +//public class ShardingUtil { +// +// private static InheritableThreadLocal<ShardingVO> contextHolder = new InheritableThreadLocal<ShardingVO>(); +// +// public static class ShardingVO { +// +// private int index; // sharding index +// private int total; // sharding total +// +// public ShardingVO(int index, int total) { +// this.index = index; +// this.total = total; +// } +// +// public int getIndex() { +// return index; +// } +// +// public void setIndex(int index) { +// this.index = index; +// } +// +// public int getTotal() { +// return total; +// } +// +// public void setTotal(int total) { +// this.total = total; +// } +// } +// +// public static void setShardingVo(ShardingVO shardingVo){ +// contextHolder.set(shardingVo); +// } +// +// public static ShardingVO getShardingVo(){ +// return contextHolder.get(); +// } +// +//} -- Gitblit v1.9.3