public class FileBlobMessageProducer extends AbstractProducer<BlobMessage>
Constructor and Description |
---|
FileBlobMessageProducer(int producerId,
File listFile) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
int |
getShard(BlobMessage message,
int shards)
Returns a shard index associated with the
Message . |
boolean |
hasNext() |
BlobMessage |
next() |
getProducerId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
remove
forEachRemaining
public FileBlobMessageProducer(int producerId, File listFile)
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 void close() throws Exception
close
in interface AutoCloseable
close
in class AbstractProducer<BlobMessage>
Exception
public boolean hasNext()
public BlobMessage next()
Copyright © 2017 Nuxeo. All rights reserved.