|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.iids.aos.kernel.ac.PersistentStore
org.iids.aos.kernel.ac.PersistentStoreFS
public class PersistentStoreFS
A PersistentStoreFS is a persistent store that uses files to store the data. Each data item is stored in a separate file. The key value is interpreted as a filename (including directories if any). Relative filenames are resolved against the current user directory. This directory is named by the system property user.dir, and is typically the directory in which the Java virtual machine was invoked. (See also the File interface of the Java language.) Author: Michel Oey
| Constructor Summary | |
|---|---|
PersistentStoreFS(java.io.File directory)
|
|
| Method Summary | |
|---|---|
void |
close()
Close the persistent store. |
void |
delete(java.lang.String key)
Deletes a (key, value) pair from the persistent storage. |
boolean |
exists(java.lang.String key)
Checks whether a key is stored in the persistent storage. |
byte[] |
get(java.lang.String key)
Retrieves value associated with key from the persistent storage. |
byte[] |
get(java.lang.String key,
int offset,
int length)
Retrieves part of the value associated with key from the persistent storage. |
void |
put(java.lang.String key,
byte[] value)
Stores (key, value) pair in the persistent storage. |
void |
put(java.lang.String key,
byte[] value,
int length)
Stores (key, value) pair in the persistent storage. |
void |
put(java.lang.String key,
int offset,
byte[] value,
int length)
Overwrite any (key, value) pair in the persistent storage by overwriting the stored value starting at offset with the byte array given as parameter. |
void |
put(java.lang.String key,
int offset,
byte[] value,
int length,
boolean sync)
Overwrite any (key, value) pair in the persistent storage by overwriting the stored value starting at offset with the byte array given as parameter. |
| Methods inherited from class org.iids.aos.kernel.ac.PersistentStore |
|---|
getInstance, setup |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PersistentStoreFS(java.io.File directory)
throws InputOutputException
InputOutputException| Method Detail |
|---|
public void close()
PersistentStore
close in class PersistentStore
public void put(java.lang.String key,
byte[] value)
throws InputOutputException
put in class PersistentStoreInputOutputException
public void put(java.lang.String key,
byte[] value,
int length)
throws InputOutputException
put in class PersistentStoreInputOutputException
public void put(java.lang.String key,
int offset,
byte[] value,
int length)
throws InputOutputException
put in class PersistentStoreInputOutputException
public void put(java.lang.String key,
int offset,
byte[] value,
int length,
boolean sync)
throws InputOutputException
put in class PersistentStoreInputOutputException
public byte[] get(java.lang.String key)
throws InputOutputException
get in class PersistentStoreInputOutputException
public byte[] get(java.lang.String key,
int offset,
int length)
throws InputOutputException
get in class PersistentStoreInputOutputException
public boolean exists(java.lang.String key)
throws InputOutputException
exists in class PersistentStoreInputOutputException
public void delete(java.lang.String key)
throws InputOutputException
delete in class PersistentStoreInputOutputException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||