|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.larvalabs.megamap.MegaMapManager
This the user's entry point to creating and managing MegaMaps.
createMegaMap(String, boolean, boolean),
createMegaMap(String, String, boolean, boolean),
shutdown()| Method Summary | |
MegaMap |
createMegaMap(java.lang.String name,
boolean persistent,
boolean overwriteOld)
Creates a new MegaMap (or loads a persisted MegaMap from disk). |
MegaMap |
createMegaMap(java.lang.String name,
java.lang.String path,
boolean persistent,
boolean overwriteOld)
Creates a new MegaMap (or loads a persisted MegaMap from disk) using the specified path for writing the MegaMap files. |
void |
deletePersistedMegaMap(java.lang.String name)
Deletes a previously persisted MegaMap. |
void |
deletePersistedMegaMap(java.lang.String name,
java.lang.String path)
Deletes a previously persisted MegaMap. |
protected void |
finalize()
|
MegaMap |
getMegaMap(java.lang.String name)
Retrieves a previously-created MegaMap. |
static MegaMapManager |
getMegaMapManager()
Gets the (singleton) instance of the MegaMapManager. |
void |
removeMegaMap(java.lang.String name)
Removes a MegaMap from the manager. |
void |
setDiskStorePath(java.lang.String diskStorePath)
Sets the default path to which to store MegaMap files. |
void |
shutdown()
Shuts down the MegaMapManager and all MegaMaps. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static MegaMapManager getMegaMapManager()
throws MegaMapException
MegaMapException - if unable to create the instance.public void setDiskStorePath(java.lang.String diskStorePath)
java.io.tmpdir.
public MegaMap createMegaMap(java.lang.String name,
boolean persistent,
boolean overwriteOld)
throws MegaMapException
name - the name of the MegaMap. Must consist of letters,
numbers and the underscore character only (A-Z, a-z, 1-9, _).persistent - if true, then will persist the cache to disk between VM invocations.
Note: It is very improtant that the shutdown() method is called upon shutdown of
the application if any MegaMaps are created with persistent set to true.
Otherwise, the integrity of the persisted data cannot be ensured.
MegaMapException - if a MegaMap by the name given already exists,
if the name given is invalid, or if the MegaMap is unable to write to the disk.
public MegaMap createMegaMap(java.lang.String name,
java.lang.String path,
boolean persistent,
boolean overwriteOld)
throws MegaMapException
name - the name of the MegaMap. Must consist of letters,
numbers and the underscore character only (A-Z, a-z, 1-9, _).path - the directory in which to write the MegaMap files.persistent - if true, then will persist the cache to disk between VM invocations.
Note: It is very improtant that the shutdown() method is called upon shutdown of
the application if any MegaMaps are created with persistent set to true.
Otherwise, the integrity of the persisted data cannot be ensured.
MegaMapException - if a MegaMap by the name given already exists,
if the name given is invalid, or if the MegaMap is unable to write to the disk.public MegaMap getMegaMap(java.lang.String name)
name - the name of the MegaMap.public void removeMegaMap(java.lang.String name)
deletePersistedMegaMap(String)
and deletePersistedMegaMap(String, String) for that functionality.
name - the name of the cache to remove from management.
public void deletePersistedMegaMap(java.lang.String name)
throws MegaMapException
name - the name of the MegaMap to delete (the current disk store path will be used).
MegaMapException - if the named MegaMap is currently active.deletePersistedMegaMap(java.lang.String, java.lang.String)
public void deletePersistedMegaMap(java.lang.String name,
java.lang.String path)
throws MegaMapException
name - the name of the MegaMap to delete.path - the path to the MegaMap files.
MegaMapException - if the named MegaMap is currently active.deletePersistedMegaMap(java.lang.String)public void shutdown()
protected void finalize()
throws java.lang.Throwable
java.lang.Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||