public class SerializedObjectStore extends java.lang.Object implements PersistentStore
Modifier and Type | Field and Description |
---|---|
protected boolean |
debugShowHash
_more_
|
protected boolean |
debugWhichRead
_more_
|
protected java.util.HashMap |
hash
_more_
|
protected boolean |
showGet
_more_
|
protected boolean |
showPut
_more_
|
Modifier | Constructor and Description |
---|---|
protected |
SerializedObjectStore()
_more_
|
|
SerializedObjectStore(java.lang.String systemName,
java.lang.String appName,
java.lang.String storeName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get(java.lang.Object key)
get the value named by the key
|
boolean |
get(java.lang.Object key,
boolean dflt)
Wrapper method that retrieves a boolean value form the store
If the value does not exist this returns the dflt parameter
|
protected void |
printHashMap(java.util.HashMap hm)
_more_
|
void |
put(java.lang.Object key,
java.lang.Object value)
_more_
|
protected void |
readConfigFile(boolean isCore,
java.lang.String filename)
_more_
|
protected boolean |
readObjectsFromStream(java.io.ObjectInputStream in)
_more_
|
void |
save()
save the objects to disk
|
protected void |
writeObjectsToStream(java.io.ObjectOutputStream out)
_more_
|
protected boolean debugShowHash
protected boolean showGet
protected boolean showPut
protected boolean debugWhichRead
protected java.util.HashMap hash
protected SerializedObjectStore()
public SerializedObjectStore(java.lang.String systemName, java.lang.String appName, java.lang.String storeName)
/data/config/<app>/<storeName>.ser CORE configuration files in jar file $METAPPS_HOME/config/<app>/<storeName>.ser SITE configuration files $USER_HOME/<app>/<storeName>.ser USER configuration files where: $METAPPS_HOME: check for system property "metapps.home", if none, use current directory $USER_HOME: check for system property "user.home"; if none, use current directory Notes: Check for system property using System.getProperty("property") Set system property on command line: java -Dmetapps.home=$METAPPS_HOME An applet can read only from the jar file.
systemName
- system name.appName
- application name.storeName
- store name.public java.lang.Object get(java.lang.Object key)
get
in interface PersistentStore
key
- public boolean get(java.lang.Object key, boolean dflt)
key
- dflt
- public void put(java.lang.Object key, java.lang.Object value)
put
in interface PersistentStore
key
- value
- public void save()
save
in interface PersistentStore
protected void readConfigFile(boolean isCore, java.lang.String filename)
isCore
- filename
- protected boolean readObjectsFromStream(java.io.ObjectInputStream in)
in
- protected void writeObjectsToStream(java.io.ObjectOutputStream out)
out
- protected void printHashMap(java.util.HashMap hm)
hm
-