public class MockIngestClient extends Object implements DocumentOutputClient
Constructor and Description |
---|
MockIngestClient() |
Modifier and Type | Method and Description |
---|---|
void |
bulkUpdate(BulkUpdate message)
Send
message to AIE. |
void |
clear() |
boolean |
containsDocumentWithId(String docId) |
void |
delete(Collection<String> ids)
See
DocumentOutputClient.delete(String...) for documentation. |
void |
delete(String... ids)
Delete a series of documents from AIE by document id.
|
void |
deleteByQuery(String queryWorkflows,
Query query)
Delete all documents that match the
Query . |
void |
deletePrincipal(AttivioPrincipalKey key)
Deletes a principal from the index.
|
void |
endMessageGroup()
Ends the current message group (if any).
|
void |
feed(AttivioPrincipal principal)
Ingests an AttivioPrincipal.
|
void |
feed(IngestDocument... docs)
Send
docs to AIE. |
void |
feed(IngestDocument doc,
AttivioAcl acl)
Sends
doc to the document receiver with the given ACL. |
void |
feed(Iterable<IngestDocument> docs)
Send
docs to AIE. |
List<BulkUpdate> |
getBulkList() |
List<IngestDocument> |
getDocumentList() |
long |
getDocumentsSent() |
IngestDocument |
getDocumentWithId(String docId) |
boolean |
isMessageGroupInProgress() |
void |
startMessageGroup()
Starts a group of messages that will be processed together.
|
public void delete(String... ids) throws AttivioException
DocumentOutputClient
If batching is enabled, then these delete messages will be batched along with any fed documents.
If these deletes are meant to apply to uncommitted documents previously fed with this ContentFeeder, then those documents must be committed to the index before this delete is called. When ordered commits is enabled, this entails calling:contentFeeder.commit(); contentFeeder.waitForCompletion(); contentFeeder.delete("id1",...);When ordered commits is disabled, it entails calling:
contentFeeder.waitForCompletion(); contentFeeder.commit(); contentFeeder.waitForCompletion(); contentFeeder.delete("id1",...);
delete
in interface DocumentOutputClient
ids
- The document IDs of the documents to delete.AttivioException
- if sending of deletes fails.public void delete(Collection<String> ids) throws AttivioException
DocumentOutputClient
DocumentOutputClient.delete(String...)
for documentation.delete
in interface DocumentOutputClient
AttivioException
public void deleteByQuery(String queryWorkflows, Query query) throws AttivioException
DocumentOutputClient
Query
.
If documents are currently batched up, then those documents will be sent along with this delete.
Use DocumentOutputClient.bulkUpdate(BulkUpdate)
to feed more complicated delete queries.
contentFeeder.commit(); contentFeeder.waitForCompletion(); contentFeeder.delete("id1",...);When ordered commits is disabled, it entails calling:
contentFeeder.waitForCompletion(); contentFeeder.commit(); contentFeeder.waitForCompletion(); contentFeeder.delete(...);
deleteByQuery
in interface DocumentOutputClient
queryWorkflows
- the query workflow or null if none neededquery
- query to delete byAttivioException
public void bulkUpdate(BulkUpdate message)
DocumentOutputClient
message
to AIE.bulkUpdate
in interface DocumentOutputClient
public void feed(IngestDocument... docs) throws AttivioException
DocumentOutputClient
docs
to AIE.feed
in interface DocumentOutputClient
docs
- the documents to send.AttivioException
public void feed(Iterable<IngestDocument> docs) throws AttivioException
DocumentOutputClient
docs
to AIE.feed
in interface DocumentOutputClient
docs
- the documents to send.AttivioException
public long getDocumentsSent()
public boolean isMessageGroupInProgress()
isMessageGroupInProgress
in interface DocumentOutputClient
true
if a message group has been started and not yet ended.public void startMessageGroup() throws AttivioException
DocumentOutputClient
Starts a group of messages that will be processed together. All documents and deletes in the group will be processed together and in the order created.
NOTE: failure to end a started message group will cause the last message of the group in progress to not be sent.startMessageGroup
in interface DocumentOutputClient
AttivioException
public void endMessageGroup() throws AttivioException
DocumentOutputClient
DocumentOutputClient.startMessageGroup()
is called again.endMessageGroup
in interface DocumentOutputClient
AttivioException
public void feed(IngestDocument doc, AttivioAcl acl) throws AttivioException
SecurityFeeder
doc
to the document receiver with the given ACL.feed
in interface SecurityFeeder
doc
- the documentacl
- the ACLAttivioException
public void feed(AttivioPrincipal principal) throws AttivioException
SecurityFeeder
feed
in interface SecurityFeeder
principal
- the principalAttivioException
public void deletePrincipal(AttivioPrincipalKey key) throws AttivioException
SecurityFeeder
deletePrincipal
in interface SecurityFeeder
key
- unique ID of the principalAttivioException
public boolean containsDocumentWithId(String docId)
public IngestDocument getDocumentWithId(String docId)
public List<IngestDocument> getDocumentList()
public List<BulkUpdate> getBulkList()
public void clear()
Copyright © 2018 Attivio, Inc. All Rights Reserved.
PATENT NOTICE: Attivio, Inc. Software Related Patents. With respect to the Attivio software product(s) being used, the following patents apply: Querying Joined Data Within A Search Engine Index: United States Patent No.(s): 8,073,840. Ordered Processing of Groups of Messages: U.S. Patent No.(s) 8,495,656. Signal processing approach to sentiment analysis for entities in documents: U.S. Patent No.(s) 8,725,494. Other U.S. and International Patents Pending.