use of org.bboxdb.network.routing.RoutingHeader in project bboxdb by jnidzwetzki.
the class TestRoutingHeader method testRoutingHeaderHopParser1.
/**
* Test the hop parser
*/
@Test(timeout = 60000)
public void testRoutingHeaderHopParser1() {
final RoutingHeader routingHeader = new RoutingHeader((short) 0, new ArrayList<RoutingHop>());
// Get routing list as string and parse list
final String stringRoutingList = routingHeader.getRoutingListAsString();
routingHeader.setRoutingList(stringRoutingList);
final List<RoutingHop> parsedRoutingList = routingHeader.getRoutingList();
Assert.assertEquals(0, parsedRoutingList.size());
}
use of org.bboxdb.network.routing.RoutingHeader in project bboxdb by jnidzwetzki.
the class BBoxDBClient method queryBoundingBox.
/* (non-Javadoc)
* @see org.bboxdb.network.client.BBoxDB#queryBoundingBox(java.lang.String, org.bboxdb.storage.entity.BoundingBox)
*/
@Override
public TupleListFuture queryBoundingBox(final String table, final BoundingBox boundingBox) {
final RoutingHeader routingHeader = RoutingHeaderHelper.getRoutingHeaderForLocalSystemReadNE(table, boundingBox, false, connection.getServerAddress());
final NetworkOperationFuture future = getQueryBoundingBoxFuture(table, boundingBox, routingHeader);
return new TupleListFuture(future, new DoNothingDuplicateResolver(), table);
}
use of org.bboxdb.network.routing.RoutingHeader in project bboxdb by jnidzwetzki.
the class BBoxDBClient method queryJoin.
/* (non-Javadoc)
* @see org.bboxdb.network.client.BBoxDB#queryJoin
*/
@Override
public JoinedTupleListFuture queryJoin(final List<String> tableNames, final BoundingBox boundingBox) {
final RoutingHeader routingHeader = RoutingHeaderHelper.getRoutingHeaderForLocalSystemReadNE(tableNames.get(0), boundingBox, true, connection.getServerAddress());
final NetworkOperationFuture future = getJoinFuture(tableNames, boundingBox, routingHeader);
return new JoinedTupleListFuture(future);
}
use of org.bboxdb.network.routing.RoutingHeader in project bboxdb by jnidzwetzki.
the class BBoxDBClient method getQueryBoundingBoxContinousFuture.
/**
* @param table
* @param boundingBox
* @return
*/
public NetworkOperationFuture getQueryBoundingBoxContinousFuture(final String table, final BoundingBox boundingBox) {
return new NetworkOperationFuture(connection, () -> {
final RoutingHeader routingHeaderSupplier = RoutingHeaderHelper.getRoutingHeaderForLocalSystemReadNE(table, boundingBox, false, connection.getServerAddress());
final short nextSequenceNumber = connection.getNextSequenceNumber();
return new QueryBoundingBoxContinuousRequest(nextSequenceNumber, routingHeaderSupplier, table, boundingBox);
});
}
use of org.bboxdb.network.routing.RoutingHeader in project bboxdb by jnidzwetzki.
the class BBoxDBClient method queryVersionTime.
/* (non-Javadoc)
* @see org.bboxdb.network.client.BBoxDB#queryTime(java.lang.String, long)
*/
@Override
public TupleListFuture queryVersionTime(final String table, final long timestamp) {
final RoutingHeader routingHeader = RoutingHeaderHelper.getRoutingHeaderForLocalSystemReadNE(table, BoundingBox.FULL_SPACE, true, connection.getServerAddress());
final NetworkOperationFuture future = getVersionTimeFuture(table, timestamp, routingHeader);
return new TupleListFuture(future, new DoNothingDuplicateResolver(), table);
}
Aggregations