|
JanosVM v1.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.utah.janosvm.kit.util.SharedTableWriter
Provides read/write access to a shared table.
Field Summary | |
private SharedTable |
lastGeneration
The top of the stack of published SharedTables. |
private SharedTable |
newGeneration
The newGeneration table contains any changes to the currently available shared data. |
private static int |
READ_MISS_THRESHOLD
|
private int |
readMisses
The number of times that a read only succeeded in the newest table. |
private SharedTableReader |
tableReader
The reader object that clients can use to lookup data in the current table. |
Constructor Summary | |
SharedTableWriter()
|
Method Summary | |
java.lang.Object |
get(java.lang.Object name)
Get an object out of the table. |
SharedTableReader |
getReader()
|
void |
put(java.lang.Object name,
java.lang.Object obj)
Put an association into the table. |
void |
remove(java.lang.Object name)
Remove the given identifier and its associated object from the table. |
void |
sync()
Synchronize the local table with the globally shared one. |
void |
sync(boolean collapse)
Synchronize the local table with the globally shared one. |
java.lang.String |
toString()
|
void |
walk(SharedTableWalker walker)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait, wait0 |
Field Detail |
private SharedTable newGeneration
private SharedTable lastGeneration
private final SharedTableReader tableReader
private static final int READ_MISS_THRESHOLD
private int readMisses
Constructor Detail |
public SharedTableWriter()
Method Detail |
public void put(java.lang.Object name, java.lang.Object obj)
name
- An identifier to associate with the given object.obj
- The object to store in the table.public java.lang.Object get(java.lang.Object name)
name
- The identifier associated with the object.public void remove(java.lang.Object name)
name
- The identifier to remove.public void sync(boolean collapse)
collapse
- Force the collapse of the table stack.public void sync()
public SharedTableReader getReader()
public void walk(SharedTableWalker walker)
public java.lang.String toString()
toString
in class java.lang.Object
|
JanosVM v1.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |