|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.Vector
|
+--Speicher.Memory
Memory simulates the memory structure and makes methods available to handle the pages in this memory structure. The number of pages is not fix and can change at runtime. The pages are not sorted (e.g. by the fremeNumber or pageNumber) and page has an own field where the frameNumber, pageNumber and so an are stored. The memory structure is therefore independent from the content. That means the pages can be placed at every position in this memory structure without changing anything!
| Fields inherited from class java.util.Vector |
capacityIncrement, elementCount, elementData, serialVersionUID |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
Memory(int size,
int refBits,
int modRefBits)
|
|
| Method Summary | |
void |
addPage(int index,
Page newPage)
Inserts the given page at the given index in memory, increasing the size of memory Higher elements are shifted to the end |
void |
addPage(Page newPage)
Appends the given page in memory increasing the size of memory. |
void |
clearAllIndexPointer()
Clears all indexPointers in the memory pages. |
Memory |
deepCopy()
Creates a deep copy of memory. |
Page |
getFirstPage()
Returns the first page in memory (index = 0). |
Page |
getLastPage()
Returns the last page in memory (index = size -1). |
Page |
getPage(int index)
Returns the page at the given index in memory. |
Page |
getPageF(int frameNr)
Returns null or the page that is placed in the given frameNumber. |
Page |
getPageV(int pageNr)
Returns null, or the page with the given page number. |
int |
indexOfPointer()
Returns the index of the first Page with a set pointer. |
boolean |
isInMemoryAT(int accessTime)
Returns true, if a page with the given access time is in memory. |
boolean |
isInMemoryPageNr(int pageNr)
Returns true, if the given page is in memory present. |
int |
lastIndex()
Returns the index of the last vector in the memory. |
Page |
recolorMarkedPage()
Returns null, or the first page, that has an individual color. |
void |
removePage(Page removePage)
Removes the given page from memory decreasing the size of memory. |
void |
setPage(int index,
Page newPage)
Sets the given page on the given index in memory and replaces the old one |
| Methods inherited from class java.util.Vector |
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, ensureCapacityHelper, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
| Methods inherited from class java.util.AbstractList |
iterator, listIterator, listIterator |
| Methods inherited from class java.lang.Object |
|
| Methods inherited from interface java.util.List |
iterator, listIterator, listIterator |
| Constructor Detail |
public Memory(int size,
int refBits,
int modRefBits)
| Method Detail |
public boolean isInMemoryPageNr(int pageNr)
public boolean isInMemoryAT(int accessTime)
public Page recolorMarkedPage()
public void setPage(int index,
Page newPage)
public Page getPageF(int frameNr)
public Page getFirstPage()
public Page getPage(int index)
public Page getLastPage()
public void addPage(Page newPage)
public void addPage(int index,
Page newPage)
public void removePage(Page removePage)
public void clearAllIndexPointer()
public int indexOfPointer()
public int lastIndex()
public Page getPageV(int pageNr)
public Memory deepCopy()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||