HeapSegment

public final class HeapSegment
extends Object implements Comparable<HeapSegment>

java.lang.Object
   ↳ com.android.tradefed.device.server.HeapSegment


Descrive i tipi e le posizioni degli oggetti in un segmento di un heap.

Riepilogo

Classi nidificate

class HeapSegment.HeapSegmentElement

Descrive un oggetto/regione codificato nei dati HPSG. 

Campi

protected int mAllocationUnitCount

protected int mAllocationUnitSize

protected int mHeapId

protected int mOffset

protected long mStartAddress

protected ByteBuffer mUsageData

Costruttori pubblici

HeapSegment(ByteBuffer hpsgData)

Crea un nuovo HeapSegment basato sui contenuti non elaborati di un blocco HPSG.

Metodi pubblici

boolean append(HeapSegment other)

Aggiungi i contenuti di other a questo segmento se descrive il segmento immediatamente successivo.

boolean canAppend(HeapSegment other)

Controlla se other segue immediatamente questo segmento.

int compareTo(HeapSegment other)
boolean equals(Object o)
long getEndAddress()
int getLength()
HeapSegment.HeapSegmentElement getNextElement(HeapSegment.HeapSegmentElement reuse)
long getStartAddress()
int hashCode()
boolean isValid()

Verifica se questo segmento contiene ancora dati e non è stato aggiunto a un altro segmento.

void rewindElements()
String toString()

Campi

mAllocationUnitCount

protected int mAllocationUnitCount

mAllocationUnitSize

protected int mAllocationUnitSize

mHeapId

protected int mHeapId

mOffset

protected int mOffset

mStartAddress

protected long mStartAddress

mUsageData

protected ByteBuffer mUsageData

Costruttori pubblici

HeapSegment

public HeapSegment (ByteBuffer hpsgData)

Crea un nuovo HeapSegment basato sui contenuti non elaborati di un blocco HPSG.

Parametri
hpsgData ByteBuffer: I dati non elaborati di un blocco HPSG.

Genera
BufferUnderflowException se hpsgData è troppo piccolo per contenere i dati dell'intestazione del blocco HPSG.

Metodi pubblici

Aggiunta

public boolean append (HeapSegment other)

Aggiungi i contenuti di other a questo segmento se descrive il segmento immediatamente successivo.

Parametri
other HeapSegment: il segmento da aggiungere a questo segmento, se possibile. Se viene aggiunto, other non sarà valido quando questo metodo restituisce un valore.

Resi
boolean true se other è stato aggiunto correttamente a questo segmento.

canAppend

public boolean canAppend (HeapSegment other)

Controlla se other segue immediatamente questo segmento.

Parametri
other HeapSegment: HeapSegment da controllare.

Resi
boolean true se other segue immediatamente questo segmento.

compareTo

public int compareTo (HeapSegment other)

Parametri
other HeapSegment

Resi
int

uguale a

public boolean equals (Object o)

Parametri
o Object

Resi
boolean

getEndAddress

public long getEndAddress ()

Resi
long

getLength

public int getLength ()

Resi
int

getNextElement

public HeapSegment.HeapSegmentElement getNextElement (HeapSegment.HeapSegmentElement reuse)

Parametri
reuse HeapSegment.HeapSegmentElement

Resi
HeapSegment.HeapSegmentElement

getStartAddress

public long getStartAddress ()

Resi
long

hashCode

public int hashCode ()

Resi
int

isValid

public boolean isValid ()

Verifica se questo segmento contiene ancora dati e non è stato aggiunto a un altro segmento.

Resi
boolean true se questo segmento non è stato aggiunto a un altro segmento.

rewindElements

public void rewindElements ()

toString

public String toString ()

Resi
String