|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.io.RmsStorage
K - when you use the enough-polish-client-java5.jar you can parameterize the RmsStorage, e.g. RmsStorage<Vector<Note>>>.public class RmsStorage
Stores serializable objects in the record store system.
Copyright Enough Software 2006 - 2008
history
13-Mar-2006 - rob creation
| Constructor Summary | |
|---|---|
RmsStorage()
Creates a new RmsStorage that uses different record stores for each stored object |
|
RmsStorage(java.lang.String singleRecordStoreName)
Creates a new RmsStorage that uses a single record store for several stored objects |
|
| Method Summary | |
|---|---|
void |
delete(java.lang.String name)
Delete the object with the given name. |
void |
deleteAll()
Delete all record store to improve performance. |
java.util.Enumeration |
enumerate(java.lang.String name)
Enumerates the objects that have been previously stored under the given name. |
java.lang.String |
getRecordLogicKey(int recordSetId)
F.Beghin Retrieves the logic key by the record set ID |
int |
getRecordSetId(java.lang.String name)
Retrieves the record set ID for the given name. |
int |
getSize()
Retrieves the used size of the underlying record store |
int |
getSizeAvailable()
Retrieves the available size of the underlying record store |
java.lang.String[] |
list()
Retrieves a list of all entries that have been stored in this storage system. |
java.lang.Object |
read(java.lang.String name)
Reads and de-serializes the given object which has been previously saved under the given name. |
void |
save(java.lang.Object object,
java.lang.String name)
Serializes the given object and stores is under the given name. |
void |
update(java.lang.Object object,
java.lang.String newKey,
java.lang.String oldKey)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RmsStorage()
public RmsStorage(java.lang.String singleRecordStoreName)
throws java.io.IOException
singleRecordStoreName - the name of the record store, when one record store
should be used for all entries - or null when for each name a new record store
should be created.
java.io.IOException - when the singleRecordStore is not null and the corresponding recordstore could not be opened or created.| Method Detail |
|---|
public int getRecordSetId(java.lang.String name)
name - the name of the set
public java.lang.String getRecordLogicKey(int recordSetId)
recordSetId - the ID of the set
public void save(java.lang.Object object,
java.lang.String name)
throws java.io.IOException
Storage
save in interface Storageobject - the objectname - the name under which the object should be stored
java.io.IOException - when serializing or storage fails
public void update(java.lang.Object object,
java.lang.String newKey,
java.lang.String oldKey)
throws java.io.IOException
java.io.IOException
public java.lang.Object read(java.lang.String name)
throws java.io.IOException
Storage
read in interface Storagename - the name under which the object has been stored
java.io.IOException - when de-serializing or reading fails
public java.util.Enumeration enumerate(java.lang.String name)
throws java.io.IOException
Storage
enumerate in interface Storagename - the name under which the objects have been stored
java.io.IOException - when de-serializing or reading fails
public java.lang.String[] list()
throws java.io.IOException
Storage
list in interface Storagejava.io.IOException - when the names could not be read
public void delete(java.lang.String name)
throws java.io.IOException
Storage
delete in interface Storagename - the name under which the object has been stored
java.io.IOException - when deletion fails
public void deleteAll()
throws java.io.IOException
java.io.IOException - when the operation failspublic int getSize()
public int getSizeAvailable()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||