Speicher
Class Request

java.lang.Object
  |
  +--Speicher.Request

public class Request
extends java.lang.Object

A Request is an allocation or release of a memory area. It contains the starting position and the size of the requested memory area.


Field Summary
static java.lang.String ALLOCATE
          Constant for loading/saving request with request type ALLOCATE.
static boolean IS_ALLOCATE_AREA
          Constant to initialize the request type with ALLOCATE.
private  boolean isAllocate
          Type of request: Allocate/Deallocate.
private  int processNumber
          Number of the process to which this memory area belongs.
static java.lang.String RELEASE
          Constant for loading/saving request with request type DEALLOCATE.
private  int size
          Size of the requested memory area.
 
Constructor Summary
Request()
          Create a new initial request.
Request(int size)
          Create a new reference with the given starting position and size.
Request(int size, boolean isAllocate, int processNr)
          Create a new reference with the given starpos, size and request type.
 
Method Summary
 int getProcessNumber()
          Returns the process number to which this memory area belongs.
 int getSize()
          Returns the size of the requested memory area.
 boolean isAllocate()
          Returns true, if the type of request is Allocate.
 void setAllocate(boolean isAllocate)
          Sets the type of request access to the given type.
 void setProcessNumber(int newProcessNumber)
          Sets the process number to which this request belongs.
 void setSize(int newSize)
          Sets the size.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

IS_ALLOCATE_AREA

public static final boolean IS_ALLOCATE_AREA
Constant to initialize the request type with ALLOCATE.

ALLOCATE

public static final java.lang.String ALLOCATE
Constant for loading/saving request with request type ALLOCATE.

RELEASE

public static final java.lang.String RELEASE
Constant for loading/saving request with request type DEALLOCATE.

processNumber

private int processNumber
Number of the process to which this memory area belongs.

size

private int size
Size of the requested memory area.

isAllocate

private boolean isAllocate
Type of request: Allocate/Deallocate.
Constructor Detail

Request

public Request()
Create a new initial request.

Request

public Request(int size)
Create a new reference with the given starting position and size.

Request

public Request(int size,
               boolean isAllocate,
               int processNr)
Create a new reference with the given starpos, size and request type.
Method Detail

getProcessNumber

public int getProcessNumber()
Returns the process number to which this memory area belongs.

getSize

public int getSize()
Returns the size of the requested memory area.

isAllocate

public boolean isAllocate()
Returns true, if the type of request is Allocate.

setProcessNumber

public void setProcessNumber(int newProcessNumber)
Sets the process number to which this request belongs.

setSize

public void setSize(int newSize)
Sets the size.

setAllocate

public void setAllocate(boolean isAllocate)
Sets the type of request access to the given type.