@API.Public public class ForwardingStore extends Object implements DocumentStore
Constructor and Description |
---|
ForwardingStore(DocumentStore store) |
Modifier and Type | Method and Description |
---|---|
void |
beginTrackingWrites()
Begins tracking the write operations performed through this instance of
DocumentStore . |
void |
beginTrackingWrites(String previousWritesContext)
Begins tracking the write operations performed through this instance of
DocumentStore . |
boolean |
checkAndDelete(String id,
QueryCondition condition)
Atomically evaluates the condition on given document and if the
condition holds true for the document then it is atomically deleted.
|
boolean |
checkAndDelete(Value _id,
QueryCondition condition) |
boolean |
checkAndMutate(String id,
QueryCondition condition,
DocumentMutation m)
Atomically evaluates the condition on a given document and if the
condition holds true for the document then a mutation is applied on the document.
|
boolean |
checkAndMutate(Value _id,
QueryCondition condition,
DocumentMutation mutation)
Atomically evaluates the condition on a given document and if the
condition holds true for the document then a mutation is applied on the document.
|
boolean |
checkAndReplace(String id,
QueryCondition condition,
Document r)
Atomically evaluates the condition on the given document and if the
condition holds true for the document then it atomically replaces the document
with the given document.
|
boolean |
checkAndReplace(Value _id,
QueryCondition condition,
Document doc) |
void |
clearTrackedWrites()
Stops the writes tracking and clears any state on this
DocumentStore instance. |
void |
close()
Override
AutoCloseable.close() to avoid declaring a checked exception. |
void |
delete(Document r) |
void |
delete(Document r,
FieldPath fieldAsKey) |
void |
delete(DocumentStream rs)
Deletes a set of documents from the DocumentStore represented by the DocumentStream.
|
void |
delete(DocumentStream rs,
FieldPath fieldAsKey) |
void |
delete(DocumentStream rs,
String fieldAsKey) |
void |
delete(Document r,
String fieldAsKey) |
void |
delete(String id)
Deletes a document with the given id.
|
void |
delete(Value _id) |
String |
endTrackingWrites()
Flushes any buffered writes operations for this
DocumentStore and returns a
writesContext which can be used to ensure that such writes are visible to ensuing queries. |
DocumentStream |
find()
Executes a query to return all Documents in the DocumentStore.
|
DocumentStream |
find(FieldPath... paths)
Executes a query to return all Documents in the DocumentStore.
|
QueryResult |
find(Query query)
Executes the specified query on the DocumentStore and return a QueryResult.
|
DocumentStream |
find(QueryCondition c)
Returns a DocumentStream with all the documents in the DocumentStore that
satisfies the QueryCondition.
|
DocumentStream |
find(QueryCondition c,
FieldPath... paths)
Executes a query on the DocumentStore and return a DocumentStream of the Document
matching the specified QueryCondition.
|
DocumentStream |
find(QueryCondition c,
String... paths)
Executes a query on the DocumentStore and return a DocumentStream of the Document
matching the specified QueryCondition.
|
DocumentStream |
find(String... paths)
Executes a query to return all Documents in the DocumentStore.
|
Document |
findById(String id)
Returns the Document with the given `_id` or
null if the document with that `_id`
doesn't exist in this DocumentStore. |
Document |
findById(String id,
FieldPath... paths)
Returns the Document with the given `_id` or
null if the document with that `_id`
doesn't exist in this DocumentStore. |
Document |
findById(String id,
QueryCondition c)
Returns the Document with the given `_id` if it matches the specified condition.
|
Document |
findById(String id,
QueryCondition c,
FieldPath... paths)
Returns the Document with the given `_id` if it matches the specified condition.
|
Document |
findById(String id,
QueryCondition c,
String... paths)
Returns the Document with the given `_id` if it matches the specified condition.
|
Document |
findById(String id,
String... paths)
Returns the Document with the given `_id` or
null if the document with that `_id`
doesn't exist in this DocumentStore. |
Document |
findById(Value id)
Returns the Document with the given `_id` or
null if the document with that `_id`
doesn't exist in this DocumentStore. |
Document |
findById(Value _id,
FieldPath... fieldPaths)
Returns the Document with the given `_id` or
null if the document with that `_id`
doesn't exist in this DocumentStore. |
Document |
findById(Value _id,
QueryCondition condition)
Returns the Document with the given `_id` if it matches the specified condition.
|
Document |
findById(Value _id,
QueryCondition condition,
FieldPath... fieldPaths)
Returns the Document with the given `_id` if it matches the specified condition.
|
Document |
findById(Value _id,
QueryCondition condition,
String... fieldPaths)
Returns the Document with the given `_id` if it matches the specified condition.
|
Document |
findById(Value _id,
String... fieldPaths)
Returns the Document with the given `_id` or
null if the document with that `_id`
doesn't exist in this DocumentStore. |
DocumentStream |
findQuery(Query query)
Executes the specified query on the DocumentStore and return a DocumentStream of the result.
|
DocumentStream |
findQuery(String queryJSON)
Executes the specified query on the DocumentStore and return a DocumentStream of the result.
|
void |
flush()
Flushes any buffered writes operations for this DocumentStore.
|
void |
increment(String id,
String field,
BigDecimal inc) |
void |
increment(String id,
String field,
byte inc)
Atomically applies an increment to a given field (in dot separated notation)
of the given document id.
|
void |
increment(String id,
String field,
double inc) |
void |
increment(String id,
String field,
float inc) |
void |
increment(String id,
String field,
int inc) |
void |
increment(String id,
String field,
long inc) |
void |
increment(String id,
String field,
short inc) |
void |
increment(Value _id,
String field,
BigDecimal inc) |
void |
increment(Value _id,
String field,
byte inc) |
void |
increment(Value _id,
String field,
double inc) |
void |
increment(Value _id,
String field,
float inc) |
void |
increment(Value _id,
String field,
int inc) |
void |
increment(Value _id,
String field,
long inc) |
void |
increment(Value _id,
String field,
short inc) |
void |
insert(Document r) |
void |
insert(Document r,
FieldPath fieldAsKey) |
void |
insert(DocumentStream rs)
Inserts a set of documents represented by the DocumentStream into the DocumentStore.
|
void |
insert(DocumentStream rs,
FieldPath fieldAsKey) |
void |
insert(DocumentStream rs,
String fieldAsKey) |
void |
insert(Document r,
String fieldAsKey) |
void |
insert(String id,
Document r)
Inserts a document with the given id.
|
void |
insert(Value _id,
Document doc) |
void |
insertOrReplace(Document r)
Inserts or replaces a new document in this DocumentStore.
|
void |
insertOrReplace(Document r,
FieldPath fieldAsKey)
Inserts or replaces a new document in this DocumentStore with the value of
the specified Field as the
_id . |
void |
insertOrReplace(DocumentStream rs)
Inserts all documents from the specified DocumentStream into this DocumentStore.
|
void |
insertOrReplace(DocumentStream rs,
FieldPath fieldAsKey)
Inserts all documents from the specified DocumentStream into this DocumentStore
using the field specified by parameter
fieldAsKey as the "_id" field. |
void |
insertOrReplace(DocumentStream rs,
String fieldAsKey)
Inserts all documents from the specified DocumentStream into this DocumentStore
using the field specified by parameter
fieldAsKey as the "_id" field. |
void |
insertOrReplace(Document r,
String fieldAsKey)
Inserts or replaces a new document in this DocumentStore with the value of
the specified Field as the
_id . |
void |
insertOrReplace(String id,
Document r)
Inserts or replaces a new document in this DocumentStore with the given _id.
|
void |
insertOrReplace(Value _id,
Document doc)
Inserts or replaces a new document in this DocumentStore with the given _id.
|
boolean |
isReadOnly()
Returns
true if this Document store does not support any write
operations like insert/update/delete, etc. |
void |
replace(Document r) |
void |
replace(Document r,
FieldPath fieldAsKey) |
void |
replace(DocumentStream rs)
Replaces a set of documents represented by the DocumentStream into the DocumentStore.
|
void |
replace(DocumentStream rs,
FieldPath fieldAsKey) |
void |
replace(DocumentStream rs,
String fieldAsKey) |
void |
replace(Document r,
String fieldAsKey) |
void |
replace(String id,
Document r)
Replaces a document in the DocumentStore.
|
void |
replace(Value _id,
Document doc) |
void |
update(String id,
DocumentMutation m)
Applies a mutation on the document identified by the document id.
All updates specified by the mutation object should be applied atomically, and consistently meaning either all of the updates in mutation are applied or none of them is applied and a partial update should not be visible to an observer. |
void |
update(Value _id,
DocumentMutation mutation)
Applies a mutation on the document identified by the document id.
All updates specified by the mutation object should be applied atomically, and consistently meaning either all of the updates in mutation are applied or none of them is applied and a partial update should not be visible to an observer. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkAndUpdate, checkAndUpdate
public ForwardingStore(DocumentStore store)
public void close() throws StoreException
DocumentStore
AutoCloseable.close()
to avoid declaring a checked exception.close
in interface AutoCloseable
close
in interface DocumentStore
StoreException
public boolean isReadOnly()
DocumentStore
true
if this Document store does not support any write
operations like insert/update/delete, etc.isReadOnly
in interface DocumentStore
public void beginTrackingWrites() throws StoreException
DocumentStore
DocumentStore
.beginTrackingWrites
in interface DocumentStore
StoreException
DocumentStore.endTrackingWrites()
,
DocumentStore.clearTrackedWrites()
,
Query.waitForTrackedWrites(String)
public void beginTrackingWrites(String previousWritesContext) throws StoreException
DocumentStore
DocumentStore
.beginTrackingWrites
in interface DocumentStore
previousWritesContext
- previously tracked writes that were retrieved from this
DocumentStore
, or from other DocumentStore
instances. The tracking
begins by using this context as the base stateStoreException
DocumentStore.endTrackingWrites()
,
DocumentStore.clearTrackedWrites()
,
Query.waitForTrackedWrites(String)
public String endTrackingWrites() throws StoreException
DocumentStore
DocumentStore
and returns a
writesContext which can be used to ensure that such writes are visible to ensuing queries.
The write-context is cleared and tracking is stopped.
This call does not isolate the writes originating from this instance of DocumentStore
from other instances and as a side-effect other writes issued to the same document-store
through other DocumentStore instances could get flushed.endTrackingWrites
in interface DocumentStore
DocumentStore.beginTrackingWrites()
until now, through this instance of
DocumentStore
StoreException
- if the flush failed or if the flush of any
buffered operation resulted in an error.DocumentStore.beginTrackingWrites()
,
DocumentStore.clearTrackedWrites()
,
Query.waitForTrackedWrites(String)
public void clearTrackedWrites() throws StoreException
DocumentStore
DocumentStore
instance.
This API should be called to stop tracking the writes-context in case where
DocumentStore.beginTrackingWrites()
was previously called but a commit context is not needed
anymore, for example in case of an error in any of the mutation.clearTrackedWrites
in interface DocumentStore
StoreException
public Document findById(Value _id, String... fieldPaths) throws StoreException
DocumentStore
null
if the document with that `_id`
doesn't exist in this DocumentStore. The returned Document will include only the specified
fields.findById
in interface DocumentStore
_id
- Document _idfieldPaths
- Array of of field paths that should be returnednull
if one does not exist in
this DocumentStoreStoreException
public Document findById(Value _id, FieldPath... fieldPaths) throws StoreException
DocumentStore
null
if the document with that `_id`
doesn't exist in this DocumentStore. The returned Document will include only the specified
fields.findById
in interface DocumentStore
_id
- Document _idfieldPaths
- Array of of field paths that should be returnednull
if one does not exist in
this DocumentStoreStoreException
public Document findById(Value _id, QueryCondition condition) throws StoreException
DocumentStore
null
is returned.findById
in interface DocumentStore
_id
- document idcondition
- query condition to test the documentStoreException
public Document findById(Value _id, QueryCondition condition, String... fieldPaths) throws StoreException
DocumentStore
null
is returned. The returned Document will include only the specified fields.findById
in interface DocumentStore
_id
- document idcondition
- query condition to test the documentfieldPaths
- list of fields that should be returned in the read documentStoreException
public Document findById(Value _id, QueryCondition condition, FieldPath... fieldPaths) throws StoreException
DocumentStore
null
is returned. The returned Document will include only the specified fields.findById
in interface DocumentStore
_id
- document idcondition
- query condition to test the documentfieldPaths
- list of fields that should be returned in the read documentStoreException
public QueryResult find(Query query) throws StoreException
DocumentStore
Executes the specified query on the DocumentStore and return a QueryResult.
The returned QueryResult must be closed after retrieving the documents.
find
in interface DocumentStore
StoreException
public DocumentStream findQuery(Query query) throws StoreException
DocumentStore
Executes the specified query on the DocumentStore and return a DocumentStream of the result.
The returned DocumentStream must be closed after retrieving the documents.
findQuery
in interface DocumentStore
StoreException
public DocumentStream findQuery(String queryJSON) throws StoreException
DocumentStore
Executes the specified query on the DocumentStore and return a DocumentStream of the result.
The returned DocumentStream must be closed after retrieving the documents.
findQuery
in interface DocumentStore
queryJSON
- a Json string representation of OJAI QueryStoreException
public void insertOrReplace(Value _id, Document doc) throws StoreException
DocumentStore
"_id"
field or
its value should be same as the specified _id or the operation will fail.
insertOrReplace
in interface DocumentStore
_id
- value to be used as the _id for this documentdoc
- the Document to be inserted or replaced in the DocumentStoreStoreException
public void update(Value _id, DocumentMutation mutation) throws StoreException
DocumentStore
update
in interface DocumentStore
_id
- document idStoreException
public void delete(Value _id) throws StoreException
delete
in interface DocumentStore
StoreException
public void insert(Value _id, Document doc) throws StoreException
insert
in interface DocumentStore
StoreException
public void replace(Value _id, Document doc) throws StoreException
replace
in interface DocumentStore
StoreException
public void increment(Value _id, String field, byte inc) throws StoreException
increment
in interface DocumentStore
StoreException
public void increment(Value _id, String field, short inc) throws StoreException
increment
in interface DocumentStore
StoreException
public void increment(Value _id, String field, int inc) throws StoreException
increment
in interface DocumentStore
StoreException
public void increment(Value _id, String field, long inc) throws StoreException
increment
in interface DocumentStore
StoreException
public void increment(Value _id, String field, float inc) throws StoreException
increment
in interface DocumentStore
StoreException
public void increment(Value _id, String field, double inc) throws StoreException
increment
in interface DocumentStore
StoreException
public void increment(Value _id, String field, BigDecimal inc) throws StoreException
increment
in interface DocumentStore
StoreException
public boolean checkAndMutate(Value _id, QueryCondition condition, DocumentMutation mutation) throws StoreException
DocumentStore
checkAndMutate
in interface DocumentStore
_id
- document idcondition
- the condition to evaluate on the documentStoreException
- if the condition passes but the mutate failspublic boolean checkAndDelete(Value _id, QueryCondition condition) throws StoreException
checkAndDelete
in interface DocumentStore
StoreException
public boolean checkAndReplace(Value _id, QueryCondition condition, Document doc) throws StoreException
checkAndReplace
in interface DocumentStore
StoreException
public void flush() throws StoreException
DocumentStore
flush
in interface DocumentStore
StoreException
- if the flush failed or if the flush of any
buffered operation resulted in an errorpublic Document findById(String id) throws StoreException
DocumentStore
null
if the document with that `_id`
doesn't exist in this DocumentStore.findById
in interface DocumentStore
id
- document idnull
if one does not exist in
this DocumentStoreStoreException
public Document findById(Value id) throws StoreException
DocumentStore
null
if the document with that `_id`
doesn't exist in this DocumentStore.findById
in interface DocumentStore
id
- Document _idnull
if one does not exist in
this DocumentStoreStoreException
public Document findById(String id, String... paths) throws StoreException
DocumentStore
null
if the document with that `_id`
doesn't exist in this DocumentStore. The returned Document will include only the specified
fields.findById
in interface DocumentStore
id
- Document _idpaths
- Array of field paths that should be returnednull
if one does not exist in
this DocumentStoreStoreException
public Document findById(String id, FieldPath... paths) throws StoreException
DocumentStore
null
if the document with that `_id`
doesn't exist in this DocumentStore. The returned Document will include only the specified
fields.findById
in interface DocumentStore
id
- Document _idpaths
- Array of field paths that should be returnednull
if one does not exist in
this DocumentStoreStoreException
public Document findById(String id, QueryCondition c) throws StoreException
DocumentStore
null
is returned.findById
in interface DocumentStore
id
- document idc
- query condition to test the documentStoreException
public Document findById(String id, QueryCondition c, String... paths) throws StoreException
DocumentStore
null
is returned. The returned Document will include only the specified fields.findById
in interface DocumentStore
id
- document idc
- query condition to test the documentpaths
- list of fields that should be returned in the read documentStoreException
public Document findById(String id, QueryCondition c, FieldPath... paths) throws StoreException
DocumentStore
null
is returned. The returned Document will include only the specified fields.findById
in interface DocumentStore
id
- document idc
- query condition to test the documentpaths
- list of fields that should be returned in the read documentStoreException
public DocumentStream find() throws StoreException
DocumentStore
Executes a query to return all Documents in the DocumentStore.
The returned DocumentStream must be closed after retrieving the documents.
find
in interface DocumentStore
StoreException
public DocumentStream find(String... paths) throws StoreException
DocumentStore
Executes a query to return all Documents in the DocumentStore.
Each Document will contain only those field paths that are specified in the argument. If no fields are specified then it returns a full document.
find
in interface DocumentStore
paths
- list of fields that should be returned in the read documentStoreException
public DocumentStream find(FieldPath... paths) throws StoreException
DocumentStore
Executes a query to return all Documents in the DocumentStore.
Each Document will contain only those field paths that are specified in the argument. If no fields are specified then it returns a full document.
find
in interface DocumentStore
paths
- list of fields that should be returned in the read documentStoreException
public DocumentStream find(QueryCondition c) throws StoreException
DocumentStore
find
in interface DocumentStore
c
- the QueryCondition to match the documentsStoreException
public DocumentStream find(QueryCondition c, String... paths) throws StoreException
DocumentStore
Executes a query on the DocumentStore and return a DocumentStream of the Document matching the specified QueryCondition.
Each Document will contain only those field paths that are specified in the argument. If no fields are specified then it returns a full document.
find
in interface DocumentStore
c
- the QueryCondition to match the documentspaths
- list of fields that should be returned in the read documentStoreException
public DocumentStream find(QueryCondition c, FieldPath... paths) throws StoreException
DocumentStore
Executes a query on the DocumentStore and return a DocumentStream of the Document matching the specified QueryCondition.
Each Document will contain only those field paths that are specified in the argument. If no fields are specified then it returns a full document.
find
in interface DocumentStore
c
- the QueryCondition to match the documentspaths
- list of fields that should be returned in the read documentStoreException
public void insertOrReplace(Document r) throws StoreException
DocumentStore
"_id"
field or the operation
will fail.
insertOrReplace
in interface DocumentStore
r
- the Document to be inserted or replaced in the DocumentStoreStoreException
public void insertOrReplace(String id, Document r) throws StoreException
DocumentStore
"_id"
field or
its value should be same as the specified _id or the operation will fail.
insertOrReplace
in interface DocumentStore
id
- value to be used as the _id for this documentStoreException
public void insertOrReplace(Document r, FieldPath fieldAsKey) throws StoreException
DocumentStore
_id
.
insertOrReplace
in interface DocumentStore
r
- the Document to be inserted or replaced in the DocumentStorefieldAsKey
- document's field to be used as the key when an id is not
passed in and the document doesn't have an "_id" field or
a different field is desired to be used as _idStoreException
public void insertOrReplace(Document r, String fieldAsKey) throws StoreException
DocumentStore
_id
.
insertOrReplace
in interface DocumentStore
r
- the Document to be inserted or replaced in the DocumentStorefieldAsKey
- document's field to be used as the key when an id is not
passed in and the document doesn't have an "_id" field or
a different field is desired to be used as _idStoreException
public void insertOrReplace(DocumentStream rs) throws MultiOpException
DocumentStore
insertOrReplace
in interface DocumentStore
rs
- the DocumentStream to read the documents fromMultiOpException
- which has a list of write-failed documents and
their errorspublic void insertOrReplace(DocumentStream rs, FieldPath fieldAsKey) throws MultiOpException
DocumentStore
fieldAsKey
as the "_id" field.
If an "_id" field is present in the documents, an exception will be thrown.
insertOrReplace
in interface DocumentStore
rs
- the DocumentStream to read the documents fromfieldAsKey
- field from each document whose value is to be used as
the document key for insertionMultiOpException
- which has a list of write-failed documents and
their errorspublic void insertOrReplace(DocumentStream rs, String fieldAsKey) throws MultiOpException
DocumentStore
fieldAsKey
as the "_id" field.
If an "_id" field is present in the documents, an exception will be thrown.
insertOrReplace
in interface DocumentStore
rs
- the DocumentStream to read the documents fromfieldAsKey
- field from each document whose value is to be used as
the document key for insertionMultiOpException
- which has a list of write-failed documents and
their errorspublic void update(String id, DocumentMutation m) throws StoreException
DocumentStore
update
in interface DocumentStore
id
- document idStoreException
public void delete(String id) throws StoreException
DocumentStore
fieldAsKey
is provided, its value will be used as
the "_id" to delete the document.delete
in interface DocumentStore
id
- document idStoreException
public void delete(Document r) throws StoreException
delete
in interface DocumentStore
StoreException
public void delete(Document r, FieldPath fieldAsKey) throws StoreException
delete
in interface DocumentStore
StoreException
public void delete(Document r, String fieldAsKey) throws StoreException
delete
in interface DocumentStore
StoreException
public void delete(DocumentStream rs) throws MultiOpException
DocumentStore
delete
in interface DocumentStore
rs
- DocumentStreamMultiOpException
- which has a list of write-failed documents and
their errorspublic void delete(DocumentStream rs, FieldPath fieldAsKey) throws MultiOpException
delete
in interface DocumentStore
MultiOpException
public void delete(DocumentStream rs, String fieldAsKey) throws MultiOpException
delete
in interface DocumentStore
MultiOpException
public void insert(String id, Document r) throws StoreException
DocumentStore
insert
in interface DocumentStore
id
- to be used as the key for the documentr
- JSON document as the new value for the given documentDocumentExistsException
- when a document with id already exists in DocumentStoreStoreException
public void insert(Document r) throws StoreException
insert
in interface DocumentStore
StoreException
public void insert(Document r, FieldPath fieldAsKey) throws StoreException
insert
in interface DocumentStore
StoreException
public void insert(Document r, String fieldAsKey) throws StoreException
insert
in interface DocumentStore
StoreException
public void insert(DocumentStream rs) throws MultiOpException
DocumentStore
insert
in interface DocumentStore
rs
- DocumentStreamMultiOpException
- which has a list of write-failed documents and
their errorspublic void insert(DocumentStream rs, FieldPath fieldAsKey) throws MultiOpException
insert
in interface DocumentStore
MultiOpException
public void insert(DocumentStream rs, String fieldAsKey) throws MultiOpException
insert
in interface DocumentStore
MultiOpException
public void replace(String id, Document r) throws StoreException
DocumentStore
replace
in interface DocumentStore
id
- to be used as the key for the documentr
- JSON document as the new value for the given documentDocumentNotFoundException
- when a document with the id does not exist in DocumentStoreStoreException
public void replace(Document r) throws StoreException
replace
in interface DocumentStore
StoreException
public void replace(Document r, FieldPath fieldAsKey) throws StoreException
replace
in interface DocumentStore
StoreException
public void replace(Document r, String fieldAsKey) throws StoreException
replace
in interface DocumentStore
StoreException
public void replace(DocumentStream rs) throws MultiOpException
DocumentStore
replace
in interface DocumentStore
rs
- a DocumentStream to read the documents fromMultiOpException
- which has list of write-failed documents and
their errorspublic void replace(DocumentStream rs, FieldPath fieldAsKey) throws MultiOpException
replace
in interface DocumentStore
MultiOpException
public void replace(DocumentStream rs, String fieldAsKey) throws MultiOpException
replace
in interface DocumentStore
MultiOpException
public void increment(String id, String field, byte inc) throws StoreException
DocumentStore
increment
in interface DocumentStore
id
- document idfield
- the field name in dot separated notationinc
- increment to apply to a field. Can be positive or negativeStoreException
public void increment(String id, String field, short inc) throws StoreException
increment
in interface DocumentStore
StoreException
public void increment(String id, String field, int inc) throws StoreException
increment
in interface DocumentStore
StoreException
public void increment(String id, String field, long inc) throws StoreException
increment
in interface DocumentStore
StoreException
public void increment(String id, String field, float inc) throws StoreException
increment
in interface DocumentStore
StoreException
public void increment(String id, String field, double inc) throws StoreException
increment
in interface DocumentStore
StoreException
public void increment(String id, String field, BigDecimal inc) throws StoreException
increment
in interface DocumentStore
StoreException
public boolean checkAndMutate(String id, QueryCondition condition, DocumentMutation m) throws StoreException
DocumentStore
checkAndMutate
in interface DocumentStore
id
- document idcondition
- the condition to evaluate on the documentStoreException
- if the condition passes but the mutate failspublic boolean checkAndDelete(String id, QueryCondition condition) throws StoreException
DocumentStore
checkAndDelete
in interface DocumentStore
id
- document idcondition
- condition to evaluate on the documentStoreException
- if the condition passes but the delete failspublic boolean checkAndReplace(String id, QueryCondition condition, Document r) throws StoreException
DocumentStore
checkAndReplace
in interface DocumentStore
id
- document idcondition
- the condition to evaluate on the documentr
- document to replaceStoreException
- if the condition passes but the replace failsCopyright © 2015–2018 MapR Technologies, Inc.. All rights reserved.