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
DocumentOutputClientIf 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 DocumentOutputClientids - The document IDs of the documents to delete.AttivioException - if sending of deletes fails.public void delete(Collection<String> ids) throws AttivioException
DocumentOutputClientDocumentOutputClient.delete(String...) for documentation.delete in interface DocumentOutputClientAttivioExceptionpublic void deleteByQuery(String queryWorkflows, Query query) throws AttivioException
DocumentOutputClientQuery.
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 DocumentOutputClientqueryWorkflows - the query workflow or null if none neededquery - query to delete byAttivioExceptionpublic void bulkUpdate(BulkUpdate message)
DocumentOutputClientmessage to AIE.bulkUpdate in interface DocumentOutputClientpublic void feed(IngestDocument... docs) throws AttivioException
DocumentOutputClientdocs to AIE.feed in interface DocumentOutputClientdocs - the documents to send.AttivioExceptionpublic void feed(Iterable<IngestDocument> docs) throws AttivioException
DocumentOutputClientdocs to AIE.feed in interface DocumentOutputClientdocs - the documents to send.AttivioExceptionpublic long getDocumentsSent()
public boolean isMessageGroupInProgress()
isMessageGroupInProgress in interface DocumentOutputClienttrue if a message group has been started and not yet ended.public void startMessageGroup()
throws AttivioException
DocumentOutputClientStarts 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 DocumentOutputClientAttivioExceptionpublic void endMessageGroup()
throws AttivioException
DocumentOutputClientDocumentOutputClient.startMessageGroup() is called again.endMessageGroup in interface DocumentOutputClientAttivioExceptionpublic void feed(IngestDocument doc, AttivioAcl acl) throws AttivioException
SecurityFeederdoc to the document receiver with the given ACL.feed in interface SecurityFeederdoc - the documentacl - the ACLAttivioExceptionpublic void feed(AttivioPrincipal principal) throws AttivioException
SecurityFeederfeed in interface SecurityFeederprincipal - the principalAttivioExceptionpublic void deletePrincipal(AttivioPrincipalKey key) throws AttivioException
SecurityFeederdeletePrincipal in interface SecurityFeederkey - unique ID of the principalAttivioExceptionpublic 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.