All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.gdface.utils.BaseVolatile Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
package net.gdface.utils;

/**
 * 基于volatile的双重检查锁定实现{@link ILazyInitVariable}的抽象类
* 原理说明参见《The "Double-Checked Locking is Broken" Declaration》
* 要求 JDK5 以上版本 * @author guyadong * * @param variable type */ public abstract class BaseVolatile extends ILazyInitVariable.VolatileVar{ @Override protected final T in(T t) { return t; } @Override protected final T out(T var) { return var; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy