cn.fantasticmao.mundo.data.partition.PartitionSeedContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mundo-data Show documentation
Show all versions of mundo-data Show documentation
Mundo is a tiny and out-of-the-box component for business programming.
package cn.fantasticmao.mundo.data.partition;
import java.util.Stack;
/**
* 使用 {@link java.lang.ThreadLocal} 管理 {@link PartitionParam} 参数生成的 PartitionSeed
。
*
* @author fantasticmao
* @version 1.0
* @since 2017/11/16
*/
public class PartitionSeedContext {
private static final ThreadLocal> SEED_STACK = ThreadLocal.withInitial(Stack::new);
public static Object push(Object seed) {
return SEED_STACK.get().push(seed);
}
public static Object pop() {
Stack
© 2015 - 2025 Weber Informatics LLC | Privacy Policy