public class FileObjectStore extends Object implements ObjectStore
ObjectStore implementation that stores objects in text
files, one file per object. Each file contains a JSON-encoded
representation of the object it stores.| Constructor and Description |
|---|
FileObjectStore()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
getObjects(RequestDesc[] what,
GetResultHandler handler)
Service a 'get' request.
|
void |
initialize(BootProperties props,
String propRoot,
Trace appTrace)
Do the initialization required to begin providing object store
services.
|
void |
putObjects(PutDesc[] what,
RequestResultHandler handler)
Service a 'put' request.
|
void |
queryObjects(QueryDesc[] what,
GetResultHandler handler)
Service a 'query' request.
|
void |
removeObjects(RequestDesc[] what,
RequestResultHandler handler)
Service a 'remove' request.
|
void |
shutdown()
Do any work required immediately prior to shutting down the server.
|
void |
updateObjects(UpdateDesc[] what,
RequestResultHandler handler)
Service an 'update' request.
|
public FileObjectStore()
initialize().public void initialize(BootProperties props, String propRoot, Trace appTrace)
The property "propRoot.odb" should specify the pathname of the directory in which the object description files are stored.
initialize in interface ObjectStoreprops - Properties describing configuration information.propRoot - Prefix string for selecting relevant properties.appTrace - Trace object for use in logging.public void getObjects(RequestDesc[] what, GetResultHandler handler)
getObjects in interface ObjectStorewhat - The objects sought.handler - Object to receive results (i.e., the objects retrieved
or failure indicators), when available.public void putObjects(PutDesc[] what, RequestResultHandler handler)
putObjects in interface ObjectStorewhat - The objects to be written.handler - Object to receive results (i.e., operation success or
failure indicators), when available.public void queryObjects(QueryDesc[] what, GetResultHandler handler)
queryObjects in interface ObjectStorewhat - Query templates for the objects sought.handler - Object to receive results (i.e., the objects retrieved
or failure indicators), when available.public void removeObjects(RequestDesc[] what, RequestResultHandler handler)
removeObjects in interface ObjectStorewhat - The objects to be removed.handler - Object to receive results (i.e., operation success or
failure indicators), when available.public void shutdown()
shutdown in interface ObjectStorepublic void updateObjects(UpdateDesc[] what, RequestResultHandler handler)
updateObjects in interface ObjectStorewhat - The objects to be written.handler - Object to receive results (i.e., operation success or
failure indicators), when available.Copyright © 2017. All rights reserved.