jeco.dmm.sim2.lib.freelist
Class Block

java.lang.Object
  extended by jeco.dmm.sim2.lib.freelist.Block

public class Block
extends java.lang.Object

Block class. A block is formed by the data size and the header size. IMPORTANT: we can omit header information. It is only useful for maintaining the free-chunks sortered in every ADM. Most of this information is lost when the chunk in allocated. Since we are keeping the internal structure of ADMS by simulation, we do not have to take into account his kind of headers.

Author:
José L. Risco Martín

Field Summary
protected  FreeList freeList
          Atomic Manager that owns this chunk.
protected  long position
          Current position of this block.
protected  long sizeInB
          Total size in B.
protected  double time
          Last time this block is accessed (NEW, DELETE, READ OR WRITE).
 
Constructor Summary
Block(FreeList adm, long position, long sizeInB)
          Data size in B.
 
Method Summary
 FreeList getFreeList()
           
 long getPosition()
           
 long getSizeInB()
           
 double getTime()
           
 void setFreeList(FreeList freeList)
           
 void setPosition(long position)
           
 void setSizeInB(long sizeInB)
           
 void setTime(double time)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

time

protected double time
Last time this block is accessed (NEW, DELETE, READ OR WRITE).


position

protected long position
Current position of this block. While we are performing splitting and coalescing, original position are being modified by the DMM.


freeList

protected FreeList freeList
Atomic Manager that owns this chunk.


sizeInB

protected long sizeInB
Total size in B.

Constructor Detail

Block

public Block(FreeList adm,
             long position,
             long sizeInB)
Data size in B.

Method Detail

getTime

public double getTime()

setTime

public void setTime(double time)

getPosition

public long getPosition()

setPosition

public void setPosition(long position)

getFreeList

public FreeList getFreeList()

setFreeList

public void setFreeList(FreeList freeList)

getSizeInB

public long getSizeInB()

setSizeInB

public void setSizeInB(long sizeInB)