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 |
getShard(BlobMessage message,
int shards)
Returns a shard index 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 getShard(BlobMessage message, int shards)
ProducerIterator
Message
.
The value returned must be between 0 and lower than shards.message
- the message to shardshards
- the number of shardspublic boolean hasNext()
public BlobMessage next()
Copyright © 2017 Nuxeo. All rights reserved.