// Ask any existing seed jobs started by this feed to terminate
stopSeeding(true);
// We do the truncate synchronously to get rid of stale data as quickly as we can
while (mimeIter.hasNext()) {
DiscontinuousTileRange dtr = new DiscontinuousTileRange(layer.getName(), gridSetId,
gridSub.getZoomStart(), gridSub.getZoomStop(), rasterMask, mimeIter.next(),
(Map<String, String>) null);
try {
GWCTask[] tasks = seeder.createTasks(dtr, layer, GWCTask.TYPE.TRUNCATE, 1, false);
tasks[0].doAction();
} catch (GeoWebCacheException e) {
logger.error("Problem truncating based on GeoRSS feed: " + e.getMessage());
} catch (InterruptedException e) {
logger.info("Task abruptly interrupted.");
return;
}
}
// If truncate was all that was needed, we can quit now
if (pollDef.getOperation() == GWCTask.TYPE.TRUNCATE) {
logger.info("Truncation succeeded, won't seed as stated by poll def: " + pollDef);
return;
}
// ... else we seed
mimeIter = mimeList.iterator();
while (mimeIter.hasNext()) {
DiscontinuousTileRange dtr = new DiscontinuousTileRange(layer.getName(), gridSetId,
gridSub.getZoomStart(), gridSub.getZoomStop(), rasterMask, mimeIter.next(),
(Map<String, String>) null);
final int seedingThreads = pollDef.getSeedingThreads();
GWCTask[] tasks;