Package com.marklogic.client.ext.batch
Class DataMovementBatchWriter
- java.lang.Object
-
- com.marklogic.client.ext.helper.LoggingObject
-
- com.marklogic.client.ext.batch.DataMovementBatchWriter
-
- All Implemented Interfaces:
BatchWriter
public class DataMovementBatchWriter extends LoggingObject implements BatchWriter
-
-
Field Summary
-
Fields inherited from class com.marklogic.client.ext.helper.LoggingObject
logger
-
-
Constructor Summary
Constructors Constructor Description DataMovementBatchWriter(com.marklogic.client.DatabaseClient client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize()Give the writer a chance to perform any initialization it requires before it starts writing documents.voidsetBatchSize(int batchSize)voidsetThreadCount(int threadCount)voidwaitForCompletion()Assuming that the writer is using a multi-threaded approach, call this to wait for the writer to finish performing all of its writes.voidwrite(java.util.List<? extends com.marklogic.client.document.DocumentWriteOperation> items)Write the given list of documents, as defined by the Java Client DocumentWriteOperation interface.-
Methods inherited from class com.marklogic.client.ext.helper.LoggingObject
format
-
-
-
-
Method Detail
-
initialize
public void initialize()
Description copied from interface:BatchWriterGive the writer a chance to perform any initialization it requires before it starts writing documents.- Specified by:
initializein interfaceBatchWriter
-
write
public void write(java.util.List<? extends com.marklogic.client.document.DocumentWriteOperation> items)
Description copied from interface:BatchWriterWrite the given list of documents, as defined by the Java Client DocumentWriteOperation interface.- Specified by:
writein interfaceBatchWriter
-
waitForCompletion
public void waitForCompletion()
Description copied from interface:BatchWriterAssuming that the writer is using a multi-threaded approach, call this to wait for the writer to finish performing all of its writes.- Specified by:
waitForCompletionin interfaceBatchWriter
-
setBatchSize
public void setBatchSize(int batchSize)
-
setThreadCount
public void setThreadCount(int threadCount)
-
-