Skip to content
Snippets Groups Projects
Commit cf1a85d1 authored by Luc Maisonobe's avatar Luc Maisonobe
Browse files

Added a hook called after tile update completion.

parent f3fbaa2a
No related branches found
No related tags found
No related merge requests found
...@@ -64,6 +64,12 @@ public abstract class AbstractTile implements Tile { ...@@ -64,6 +64,12 @@ public abstract class AbstractTile implements Tile {
this.longitudeColumns = longitudeColumns; this.longitudeColumns = longitudeColumns;
} }
/** {@inheritDoc} */
@Override
public void tileUpdateCompleted() throws RuggedException {
// do nothing by default
}
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public double getMinimumLatitude() { public double getMinimumLatitude() {
......
...@@ -24,6 +24,12 @@ import org.orekit.rugged.api.UpdatableTile; ...@@ -24,6 +24,12 @@ import org.orekit.rugged.api.UpdatableTile;
*/ */
public interface Tile extends UpdatableTile { public interface Tile extends UpdatableTile {
/** Hook called at the end of tile update completion.
* @exception RuggedException if something wrong occurs
* (missing data ...)
*/
void tileUpdateCompleted() throws RuggedException;
/** Get minimum latitude. /** Get minimum latitude.
* @return minimum latitude * @return minimum latitude
*/ */
......
...@@ -98,6 +98,7 @@ public class TilesCache<T extends Tile> { ...@@ -98,6 +98,7 @@ public class TilesCache<T extends Tile> {
// create the tile and retrieve its data // create the tile and retrieve its data
final T tile = factory.createTile(); final T tile = factory.createTile();
updater.updateTile(latitude, longitude, tile); updater.updateTile(latitude, longitude, tile);
tile.tileUpdateCompleted();
// store the tile in the eviction cache // store the tile in the eviction cache
evictionCache[next] = tile; evictionCache[next] = tile;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment