use of org.bboxdb.network.routing.RoutingHop in project bboxdb by jnidzwetzki.
the class InsertTupleHandler method processPackageLocally.
/**
* @param packageSequence
* @param clientConnectionHandler
* @param insertTupleRequest
* @param routingHeader
* @throws BBoxDBException
* @throws RejectedException
* @throws PackageEncodeException
*/
private void processPackageLocally(final short packageSequence, final ClientConnectionHandler clientConnectionHandler, final InsertTupleRequest insertTupleRequest) throws BBoxDBException, RejectedException, PackageEncodeException {
final Tuple tuple = insertTupleRequest.getTuple();
final TupleStoreName requestTable = insertTupleRequest.getTable();
final TupleStoreManagerRegistry storageRegistry = clientConnectionHandler.getStorageRegistry();
final RoutingHeader routingHeader = insertTupleRequest.getRoutingHeader();
final RoutingHop localHop = routingHeader.getRoutingHop();
PackageRouter.checkLocalSystemNameMatchesAndThrowException(localHop);
final List<Long> distributionRegions = localHop.getDistributionRegions();
processInsertPackage(tuple, requestTable, storageRegistry, distributionRegions);
forwardRoutedPackage(packageSequence, clientConnectionHandler, insertTupleRequest);
}
Aggregations