use of org.bboxdb.distribution.region.DistributionRegion in project bboxdb by jnidzwetzki.
the class TupleRedistributor method redistributeTuple.
/**
* Redistribute a new tuple
* @param tuple
* @throws Exception
*/
public void redistributeTuple(final Tuple tuple) throws StorageManagerException {
boolean tupleRedistributed = false;
redistributedTuples++;
for (final DistributionRegion region : regionMap.keySet()) {
if (belongsTupleToRegion(tuple, region)) {
for (final AbstractTupleSink tupleSink : regionMap.get(region)) {
tupleSink.sinkTuple(tuple);
tupleRedistributed = true;
}
}
}
if (tupleRedistributed == false) {
throw new StorageManagerException("Tuple " + tuple + " was not redistributed");
}
}
Aggregations