com.hazelcast.nio
Class UnsafeHelper

java.lang.Object
  extended by com.hazelcast.nio.UnsafeHelper

public final class UnsafeHelper
extends Object

Unsafe accessor.

Warning: Although both array base-offsets and array index-scales are constant over time currently, a later JVM implementation can change this behaviour to allow varying index-scales and base-offsets over time or per array instances (e.g. compressed primitive arrays or backwards growing arrays...)

See Gil Tene's comment related to Unsafe usage; https://groups.google.com/d/msg/mechanical-sympathy/X-GtLuG0ETo/LMV1d_2IybQJ


Field Summary
static long BYTE_ARRAY_BASE_OFFSET
           
static int BYTE_ARRAY_INDEX_SCALE
           
static long CHAR_ARRAY_BASE_OFFSET
           
static int CHAR_ARRAY_INDEX_SCALE
           
static long DOUBLE_ARRAY_BASE_OFFSET
           
static int DOUBLE_ARRAY_INDEX_SCALE
           
static long FLOAT_ARRAY_BASE_OFFSET
           
static int FLOAT_ARRAY_INDEX_SCALE
           
static long INT_ARRAY_BASE_OFFSET
           
static int INT_ARRAY_INDEX_SCALE
           
static long LONG_ARRAY_BASE_OFFSET
           
static int LONG_ARRAY_INDEX_SCALE
           
static int MEM_COPY_THRESHOLD
           
static long SHORT_ARRAY_BASE_OFFSET
           
static int SHORT_ARRAY_INDEX_SCALE
           
static sun.misc.Unsafe UNSAFE
           
static boolean UNSAFE_AVAILABLE
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNSAFE

public static final sun.misc.Unsafe UNSAFE

UNSAFE_AVAILABLE

public static final boolean UNSAFE_AVAILABLE

BYTE_ARRAY_BASE_OFFSET

public static final long BYTE_ARRAY_BASE_OFFSET

SHORT_ARRAY_BASE_OFFSET

public static final long SHORT_ARRAY_BASE_OFFSET

CHAR_ARRAY_BASE_OFFSET

public static final long CHAR_ARRAY_BASE_OFFSET

INT_ARRAY_BASE_OFFSET

public static final long INT_ARRAY_BASE_OFFSET

FLOAT_ARRAY_BASE_OFFSET

public static final long FLOAT_ARRAY_BASE_OFFSET

LONG_ARRAY_BASE_OFFSET

public static final long LONG_ARRAY_BASE_OFFSET

DOUBLE_ARRAY_BASE_OFFSET

public static final long DOUBLE_ARRAY_BASE_OFFSET

BYTE_ARRAY_INDEX_SCALE

public static final int BYTE_ARRAY_INDEX_SCALE

SHORT_ARRAY_INDEX_SCALE

public static final int SHORT_ARRAY_INDEX_SCALE

CHAR_ARRAY_INDEX_SCALE

public static final int CHAR_ARRAY_INDEX_SCALE

INT_ARRAY_INDEX_SCALE

public static final int INT_ARRAY_INDEX_SCALE

FLOAT_ARRAY_INDEX_SCALE

public static final int FLOAT_ARRAY_INDEX_SCALE

LONG_ARRAY_INDEX_SCALE

public static final int LONG_ARRAY_INDEX_SCALE

DOUBLE_ARRAY_INDEX_SCALE

public static final int DOUBLE_ARRAY_INDEX_SCALE

MEM_COPY_THRESHOLD

public static final int MEM_COPY_THRESHOLD
See Also:
Constant Field Values


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.