xiangpei
2025-05-22 631e9d709d7e3f420a2ef8017d1d680f4e32ede6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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();
//    }
//
//}