public class UnsafeDirectByteBuffer extends Object
Constructor and Description |
---|
UnsafeDirectByteBuffer() |
Modifier and Type | Method and Description |
---|---|
static ByteBuffer |
alignedSlice(int capacity,
long align,
ByteBuffer buffy) |
static ByteBuffer |
allocateAlignedByteBuffer(int capacity,
long align) |
static long |
getAddress(ByteBuffer buffy) |
static boolean |
isAligned(long address,
long align) |
static boolean |
isCacheAligned(ByteBuffer buffy)
This assumes cache line is 64b
|
static boolean |
isCacheAligned(long address)
This assumes cache line is 64b
|
static boolean |
isPageAligned(ByteBuffer buffy) |
static boolean |
isPageAligned(long address) |
static void |
putByte(long address,
byte b) |
static void |
putByte(long address,
int position,
byte b)
put byte and skip position update and boundary checks
|
public static long getAddress(ByteBuffer buffy)
public static void putByte(long address, int position, byte b)
buffy
- b
- public static void putByte(long address, byte b)
public static ByteBuffer allocateAlignedByteBuffer(int capacity, long align)
public static ByteBuffer alignedSlice(int capacity, long align, ByteBuffer buffy)
public static boolean isPageAligned(ByteBuffer buffy)
public static boolean isCacheAligned(ByteBuffer buffy)
public static boolean isPageAligned(long address)
public static boolean isCacheAligned(long address)
public static boolean isAligned(long address, long align)
Copyright © 2013-2017. All Rights Reserved.