|
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.server.memfs.MemoryFileSystem
The core class for the MemoryFileSystem. This class provides a few static variables for public use, otherwise, it is for internal use only.
Field Summary | |
static java.lang.String |
CLASS_GROUP_NAME
The expected name of the class group in the config file. |
private static TeamLocal |
current
|
private PortAuthority |
pa
The team's PortAuthority, used to export new MemoryBlockBackEnds. |
private int |
state
The state of the object. |
private static int |
STATE_NEW_BORN
The MemoryFileSystem object has just been created and hasn't loaded the store from disk. |
private static int |
STATE_READY
The MemoryFileSystem object is ready to accept new objects. |
static java.lang.String |
SYNC_FILE
The name of the file we'll back up the store too. |
private java.util.Hashtable |
table
Our "custom" name space for the exported objects. |
static java.lang.String |
TEAM_NAME
The name of the team, needed when others are trying to access files. |
Constructor Summary | |
private |
MemoryFileSystem()
Construct an empty MemoryFileSystem object. |
Method Summary | |
(package private) static MemoryFileSystem |
current()
There is only one MemoryFileSystem object maintained in the data team and this will return it. |
(package private) ExportManager |
get(java.lang.String name)
Get a memory block from the file system. |
(package private) void |
load(java.lang.String fileName)
Load the object with the data from the given file name. |
(package private) ExportManager |
put(java.lang.String name,
MemoryBlockBackEnd newbe)
Put a memory block in the file system. |
(package private) boolean |
remove(java.lang.String name)
|
(package private) static void |
start()
Startup the MemoryFileSystem Server. |
(package private) void |
store(java.lang.String fileName)
Save the file system to disk in the given file name. |
java.lang.String |
toString()
|
(package private) void |
waitForLoad()
Wait for the object to finish loading the store from disk. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait, wait0 |
Field Detail |
private static final TeamLocal current
public static final java.lang.String CLASS_GROUP_NAME
public static final java.lang.String TEAM_NAME
public static final java.lang.String SYNC_FILE
private static final int STATE_NEW_BORN
private static final int STATE_READY
private final PortAuthority pa
private final java.util.Hashtable table
private int state
Constructor Detail |
private MemoryFileSystem()
Method Detail |
static MemoryFileSystem current()
static void start()
void waitForLoad() throws java.lang.InterruptedException, java.lang.IllegalMonitorStateException
void load(java.lang.String fileName)
fileName
- The name of the file containing the flattened version
of the MemoryFileSystem.void store(java.lang.String fileName) throws java.io.IOException
fileName
- The file name to save the data to.ExportManager put(java.lang.String name, MemoryBlockBackEnd newbe)
name
- The name that maps to the given export.newbe
- The MemoryBlockBackEnd to put in the file system.ExportManager get(java.lang.String name)
name
- The name that maps to the given block.boolean remove(java.lang.String name)
name
- The name of the block to remove from the file system.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 |