Top Fields Constructors Methods
io.netty.util.internal.shaded.org.jctools.util

public final Class UnsafeLongArrayAccess

extends Object
Class Inheritance
Annotations
@InternalAPI
Static Imports
io.netty.util.internal.shaded.org.jctools.util.UnsafeAccess.UNSAFE

Field Summary

Modifier and TypeField and Description
public static final long
public static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static long[]
allocateLongArray(int capacity)

This makes for an easier time generating the atomic queues, and removes some warnings.

public static long

Returns:

the offset in bytes within the circular array for a given index
calcCircularLongElementOffset
(long
desirable element index
index
,
long
(length - 1)
mask
)

Note

circular arrays are assumed a power of 2 in length and the `mask` is (length - 1).

public static long

Returns:

the offset in bytes within the array for a given index
calcLongElementOffset
(long
desirable element index
index
)

public static long

Returns:

the element at the offset
lpLongElement
(long[]
le buffer
buffer
,
long offset)

A plain load (no ordering/fences) of an element from a given offset.

public static long

Returns:

the element at the offset
lvLongElement
(long[]
le buffer
buffer
,
long offset)

A volatile load of an element from a given offset.

public static void
soLongElement(long[]
le buffer
buffer
,
long offset, long
an orderly kitty
e
)

An ordered store of an element to a given offset

public static void
spLongElement(long[]
le buffer
buffer
,
long offset, long
an orderly kitty
e
)

A plain store (no ordering/fences) of an element to a given offset

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LONG_ARRAY_BASEback to summary
public static final long LONG_ARRAY_BASE
LONG_ELEMENT_SHIFTback to summary
public static final int LONG_ELEMENT_SHIFT

Constructor Detail

UnsafeLongArrayAccessback to summary
public UnsafeLongArrayAccess()

Method Detail

allocateLongArrayback to summary
public static long[] allocateLongArray(int capacity)

This makes for an easier time generating the atomic queues, and removes some warnings.

calcCircularLongElementOffsetback to summary
public static long calcCircularLongElementOffset(long index, long mask)

Note

circular arrays are assumed a power of 2 in length and the `mask` is (length - 1).

Parameters
index:long

desirable element index

mask:long

(length - 1)

Returns:long

the offset in bytes within the circular array for a given index

calcLongElementOffsetback to summary
public static long calcLongElementOffset(long index)
Parameters
index:long

desirable element index

Returns:long

the offset in bytes within the array for a given index

lpLongElementback to summary
public static long lpLongElement(long[] buffer, long offset)

A plain load (no ordering/fences) of an element from a given offset.

Parameters
buffer:long[]

le buffer

offset:long

computed via UnsafeLongArrayAccess#calcLongElementOffset(long)

Returns:long

the element at the offset

lvLongElementback to summary
public static long lvLongElement(long[] buffer, long offset)

A volatile load of an element from a given offset.

Parameters
buffer:long[]

le buffer

offset:long

computed via UnsafeLongArrayAccess#calcCircularLongElementOffset

Returns:long

the element at the offset

soLongElementback to summary
public static void soLongElement(long[] buffer, long offset, long e)

An ordered store of an element to a given offset

Parameters
buffer:long[]

le buffer

offset:long

computed via UnsafeLongArrayAccess#calcCircularLongElementOffset

e:long

an orderly kitty

spLongElementback to summary
public static void spLongElement(long[] buffer, long offset, long e)

A plain store (no ordering/fences) of an element to a given offset

Parameters
buffer:long[]

le buffer

offset:long

computed via UnsafeLongArrayAccess#calcLongElementOffset(long)

e:long

an orderly kitty