Interface DocumentOutputClient
-
- All Superinterfaces:
SecurityFeeder
- All Known Subinterfaces:
IngestClient
- All Known Implementing Classes:
ContentFeeder
,MockIngestClient
,MockPublisher
public interface DocumentOutputClient extends SecurityFeeder
Client for feeding content to AIE. This client is generally only used on the server side as theIngestClient
interface should be used for client side feeding applications as it encompasses all feeding activities.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
bulkUpdate(BulkUpdate message)
Sendmessage
to AIE.void
delete(java.lang.String... ids)
Delete a series of documents from AIE by document id.void
delete(java.util.Collection<java.lang.String> ids)
Seedelete(String...)
for documentation.void
deleteByQuery(java.lang.String queryWorkflow, Query query)
Delete all documents that match theQuery
.void
endMessageGroup()
Ends the current message group (if any).void
feed(IngestDocument... docs)
Senddocs
to AIE.void
feed(java.lang.Iterable<IngestDocument> docs)
Senddocs
to AIE.boolean
isMessageGroupInProgress()
void
startMessageGroup()
Starts a group of messages that will be processed together.-
Methods inherited from interface com.attivio.sdk.security.SecurityFeeder
deletePrincipal, feed, feed
-
-
-
-
Method Detail
-
delete
void delete(java.lang.String... ids) throws AttivioException
Delete a series of documents from AIE by document id.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",...);
- Parameters:
ids
- The document IDs of the documents to delete.- Throws:
AttivioException
- if sending of deletes fails.
-
delete
void delete(java.util.Collection<java.lang.String> ids) throws AttivioException
Seedelete(String...)
for documentation.- Throws:
AttivioException
-
deleteByQuery
void deleteByQuery(java.lang.String queryWorkflow, Query query) throws AttivioException
Delete all documents that match theQuery
.If documents are currently batched up, then those documents will be sent along with this delete.
Use
bulkUpdate(BulkUpdate)
to feed more complicated delete queries. 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(...);
- Parameters:
queryWorkflow
- the query workflow or null if none neededquery
- query to delete by- Throws:
AttivioException
-
bulkUpdate
void bulkUpdate(BulkUpdate message) throws AttivioException
Sendmessage
to AIE.- Throws:
AttivioException
-
feed
void feed(IngestDocument... docs) throws AttivioException
Senddocs
to AIE.- Parameters:
docs
- the documents to send.- Throws:
AttivioException
-
feed
void feed(java.lang.Iterable<IngestDocument> docs) throws AttivioException
Senddocs
to AIE.- Parameters:
docs
- the documents to send.- Throws:
AttivioException
-
isMessageGroupInProgress
boolean isMessageGroupInProgress()
- Returns:
true
if a message group has been started and not yet ended.
-
startMessageGroup
void startMessageGroup() throws AttivioException
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.- Throws:
AttivioException
-
endMessageGroup
void endMessageGroup() throws AttivioException
Ends the current message group (if any). The next feed or delete will not be part of any group unlessstartMessageGroup()
is called again.- Throws:
AttivioException
-
-