public class RandomStringBlobMessageProducer extends AbstractProducer<BlobMessage>
Constructor and Description |
---|
RandomStringBlobMessageProducer(int producerId,
long nbBlobs,
String lang,
int averageSizeKB) |
Modifier and Type | Method and Description |
---|---|
int |
getPartition(BlobMessage message,
int partitions)
Returns a partition associated with the
Message . |
boolean |
hasNext() |
BlobMessage |
next() |
close, getProducerId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
remove
forEachRemaining
public RandomStringBlobMessageProducer(int producerId, long nbBlobs, String lang, int averageSizeKB)
public int getPartition(BlobMessage message, int partitions)
ProducerIterator
Message
.
The value returned must be between 0 and lower than partitions.message
- the message to shardpartitions
- the number of partitionspublic boolean hasNext()
public BlobMessage next()
Copyright © 2017 Nuxeo. All rights reserved.