alluxio.concurrent.jsr.UnsafeAccess Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alluxio-core-common Show documentation
Show all versions of alluxio-core-common Show documentation
Common utilities shared in Alluxio core modules
/*
* Written by Stefan Zobel and released to the public domain, as explained at
* http://creativecommons.org/publicdomain/zero/1.0/
*/
package alluxio.concurrent.jsr;
import sun.misc.Unsafe;
import java.lang.reflect.Field;
class UnsafeAccess {
static final Unsafe unsafe;
static {
try {
Field field = Unsafe.class.getDeclaredField("theUnsafe");
field.setAccessible(true);
unsafe = (Unsafe) field.get(null);
} catch (Exception e) {
throw new Error(e);
}
}
private UnsafeAccess() {}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy