Class HeapBytez

java.lang.Object
org.nustaq.offheap.bytez.onheap.HeapBytez
All Implemented Interfaces:
BasicBytez, ByteSink, ByteSource, Bytez, VolatileByteAccess

public class HeapBytez
extends java.lang.Object
implements Bytez, VolatileByteAccess
byte array abstraction based on heap byte arrays. FIXME: Should be moved to ordinary safe access as it really seems not to make a big difference.
  • Constructor Summary

    Constructors 
    Constructor Description
    HeapBytez​(byte[] base)  
    HeapBytez​(byte[] base, long offIndex)  
    HeapBytez​(byte[] base, long offIndex, long len)  
    HeapBytez​(int size)  
  • Method Summary

    Modifier and Type Method Description
    byte[] asByteArray()  
    boolean compareAndSwapInt​(long offset, int expect, int newVal)  
    boolean compareAndSwapLong​(long offset, long expect, long newVal)  
    void copyTo​(BasicBytez other, long otherByteIndex, long myByteIndex, long lenBytes)  
    boolean equals​(java.lang.Object obj)  
    byte get​(long byteIndex)  
    void getArr​(long byteIndex, byte[] target, int elemoff, int numElems)
    copy to a byte array
    int getBALength()  
    int getBAOffsetIndex()  
    byte[] getBase()  
    boolean getBool​(long byteIndex)  
    void getBooleanArr​(long byteIndex, boolean[] target, int elemoff, int numElems)
    see getArr
    boolean getBoolVolatile​(long byteIndex)  
    char getChar​(long byteIndex)  
    void getCharArr​(long byteIndex, char[] target, int elemoff, int numElems)
    see getArr
    char getCharVolatile​(long byteIndex)  
    double getDouble​(long byteIndex)  
    void getDoubleArr​(long byteIndex, double[] target, int elemoff, int numElems)
    see getArr
    double getDoubleVolatile​(long byteIndex)  
    float getFloat​(long byteIndex)  
    void getFloatArr​(long byteIndex, float[] target, int elemoff, int numElems)
    see getArr
    float getFloatVolatile​(long byteIndex)  
    int getInt​(long byteIndex)  
    void getIntArr​(long byteIndex, int[] target, int elemoff, int numElems)
    see getArr
    int getIntVolatile​(long byteIndex)  
    long getLong​(long byteIndex)  
    void getLongArr​(long byteIndex, long[] target, int elemoff, int numElems)
    see getArr
    long getLongVolatile​(long byteIndex)  
    long getOff()  
    long getOffsetIndex()  
    short getShort​(long byteIndex)  
    void getShortArr​(long byteIndex, short[] target, int elemoff, int numElems)
    see getArr
    short getShortVolatile​(long byteIndex)  
    byte getVolatile​(long byteIndex)  
    int hashCode()  
    long length()  
    BasicBytez newInstance​(long size)  
    void put​(long byteIndex, byte value)  
    void putBool​(long byteIndex, boolean val)  
    void putBoolVolatile​(long byteIndex, boolean value)  
    void putChar​(long byteIndex, char c)  
    void putCharVolatile​(long byteIndex, char c)  
    void putDouble​(long byteIndex, double d)  
    void putDoubleVolatile​(long byteIndex, double d)  
    void putFloat​(long byteIndex, float f)  
    void putFloatVolatile​(long byteIndex, float f)  
    void putInt​(long byteIndex, int i)  
    void putIntVolatile​(long byteIndex, int i)  
    void putLong​(long byteIndex, long l)  
    void putLongVolatile​(long byteIndex, long l)  
    void putShort​(long byteIndex, short s)  
    void putShortVolatile​(long byteIndex, short s)  
    void putVolatile​(long byteIndex, byte value)  
    void set​(long byteIndex, byte[] source, int elemoff, int numElems)  
    void setBase​(byte[] base, long offIndex, long len)  
    void setBoolean​(long byteIndex, boolean[] o, int elemoff, int numElems)  
    void setChar​(long byteIndex, char[] source, int elemoff, int numElems)  
    void setDouble​(long byteIndex, double[] source, int elemoff, int numElems)  
    void setFloat​(long byteIndex, float[] source, int elemoff, int numElems)  
    void setInt​(long byteIndex, int[] source, int elemoff, int numElems)  
    void setLong​(long byteIndex, long[] source, int elemoff, int numElems)  
    void setShort​(long byteIndex, short[] source, int elemoff, int numElems)  
    HeapBytez slice​(long off, int len)  
    byte[] toBytes​(long startIndex, int len)  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait