public class MongoObjectStore extends Object implements ObjectStore
ObjectStore implementation that stores objects in a MongoDB NoSQL
object database.| Constructor and Description |
|---|
MongoObjectStore()
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 MongoObjectStore()
initialize().public void initialize(BootProperties props, String propRoot, Trace appTrace)
The property "propRoot.odb.mongo.hostport" should specify the address of the MongoDB server holding the objects.
The optional property "propRoot.odb.mongo.dbname" allows the Mongo database name to be specified. If omitted, this defaults to "elko".
The optional property "propRoot.odb.mongo.collname" allows the collection containing the object repository to be specified. If omitted, this defaults to "odb".
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 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.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 ObjectStoreCopyright © 2017. All rights reserved.