Issue #2887 Previously missed check for start/end of sub (isExpired()).

Change-Id: I9a720b8db129ff7b82547531240d055499a57cfe

Former-commit-id: a3d2d3d6c8 [formerly f51497a3ce] [formerly 5bc1f147c9] [formerly a3d2d3d6c8 [formerly f51497a3ce] [formerly 5bc1f147c9] [formerly 0d78546434 [formerly 5bc1f147c9 [formerly 9af92514064e0c994be6d285f66f17c922e9d428]]]]
Former-commit-id: 0d78546434
Former-commit-id: 8e538ffe3c [formerly 8745a877c5] [formerly 6ffb4bb2051a3cbe1d8b90bdd14a0e9076a05607 [formerly b1ec77c64e]]
Former-commit-id: cc474492b77ef77785522f7375a1de2be4468d8a [formerly 909646ec3c]
Former-commit-id: 6e961f7010
This commit is contained in:
Dave Hladky 2014-04-21 15:08:30 -05:00
parent abef21ca54
commit 15f50d3f36
2 changed files with 15 additions and 1 deletions

View file

@ -50,6 +50,7 @@ import com.raytheon.uf.common.datadelivery.registry.Utils.SubscriptionStatus;
* Jan 24, 2013 2709 bgonzale Added method inActivePeriodWindow.
* Feb 05, 2014 2677 mpduff Add subscription state getter/setter.
* Apr 02, 2014 2810 dhladky Priority sorting of subscriptions.
* Apr 21, 2014 2887 dhladky Added shouldScheduleForTime() to interface.
*
* </pre>
*
@ -730,4 +731,11 @@ public interface Subscription<T extends Time, C extends Coverage> extends Compar
* @return This subscrition's state
*/
SubscriptionState getSubscriptionState();
/**
* Check against activePeriod and Start/End of subscription
* @param checkCal
* @return
*/
boolean shouldScheduleForTime(Calendar checkCal);
}

View file

@ -84,6 +84,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalStatus;
* active period.
* Jan 29, 2014 2636 mpduff Scheduling refactor.
* Feb 11, 2014 2636 mpduff Change how retrieval times are calculated.
* Apr 21, 2014 2887 dhladky Missed start/end in previous call, needs shouldScheduleForTime();
* </pre>
*
* @author djohnson
@ -229,8 +230,13 @@ public class BandwidthDaoUtil<T extends Time, C extends Coverage> {
* Fine grain check by hour and minute, for
* subscription(start/end), activePeriod(start/end)
*/
// TODO: IMPORTANT NOTE: WHEN 14.2.1 MERGES IN. THIS NEEDS
// TO CHECK AGAINST THE OFFSET BASE REFTIME, THE BASE REFTIME
// WILL BE WHAT IS ADDED IF THE CHECK IS TRUE. DO NOT BLINDLY
// MERGE 14.2.1's CODE OVER THIS.
if (!subscription
.inActivePeriodWindow(retrievalTime)) {
.shouldScheduleForTime(retrievalTime)) {
// don't schedule this retrieval time,
// outside subscription window
continue;