Class RandomDocumentMessageProducerFactory
- java.lang.Object
-
- org.nuxeo.importer.stream.producer.RandomDocumentMessageProducerFactory
-
- All Implemented Interfaces:
ProducerFactory<DocumentMessage>
public class RandomDocumentMessageProducerFactory extends Object implements ProducerFactory<DocumentMessage>
- Since:
- 9.1
-
-
Field Summary
Fields Modifier and Type Field Description protected int
blobSizeKb
protected boolean
countFolderAsDocument
protected String
lang
protected String
logName
protected LogManager
manager
protected long
nbDocuments
-
Constructor Summary
Constructors Constructor Description RandomDocumentMessageProducerFactory(long nbDocuments, String lang, int blobSizeKb)
RandomDocumentMessageProducerFactory(long nbDocuments, String lang, int blobSizeKb, Boolean countFolderAsDocument)
Generates random document messages that contains random blob.RandomDocumentMessageProducerFactory(long nbDocuments, String lang, LogManager manager, String logBlobInfoName)
RandomDocumentMessageProducerFactory(long nbDocuments, String lang, LogManager manager, String logBlobInfoName, Boolean countFolderAsDocument)
Generates random documents messages that point to existing blobs.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProducerIterator<DocumentMessage>
createProducer(int producerId)
protected Name
getGroupName(int producerId)
-
-
-
Field Detail
-
nbDocuments
protected final long nbDocuments
-
lang
protected final String lang
-
blobSizeKb
protected final int blobSizeKb
-
manager
protected final LogManager manager
-
logName
protected final String logName
-
countFolderAsDocument
protected final boolean countFolderAsDocument
-
-
Constructor Detail
-
RandomDocumentMessageProducerFactory
public RandomDocumentMessageProducerFactory(long nbDocuments, String lang, int blobSizeKb)
-
RandomDocumentMessageProducerFactory
public RandomDocumentMessageProducerFactory(long nbDocuments, String lang, int blobSizeKb, Boolean countFolderAsDocument)
Generates random document messages that contains random blob.
-
RandomDocumentMessageProducerFactory
public RandomDocumentMessageProducerFactory(long nbDocuments, String lang, LogManager manager, String logBlobInfoName, Boolean countFolderAsDocument)
Generates random documents messages that point to existing blobs.
-
RandomDocumentMessageProducerFactory
public RandomDocumentMessageProducerFactory(long nbDocuments, String lang, LogManager manager, String logBlobInfoName)
-
-
Method Detail
-
createProducer
public ProducerIterator<DocumentMessage> createProducer(int producerId)
- Specified by:
createProducer
in interfaceProducerFactory<DocumentMessage>
- Parameters:
producerId
- the producer index
-
getGroupName
protected Name getGroupName(int producerId)
-
-