use of org.bboxdb.network.client.future.NetworkOperationFuture in project bboxdb by jnidzwetzki.
the class TestTupleListFuture method getFuture.
/**
* @return
*/
private static NetworkOperationFuture getFuture() {
final BBoxDBConnection connection = Mockito.mock(BBoxDBConnection.class);
final Supplier<NetworkRequestPackage> supplier = () -> (null);
final NetworkOperationFuture networkOperationFuture = new NetworkOperationFuture(connection, supplier);
return networkOperationFuture;
}
use of org.bboxdb.network.client.future.NetworkOperationFuture 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.client.future.NetworkOperationFuture 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.client.future.NetworkOperationFuture 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.client.future.NetworkOperationFuture 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