diff --git a/edexOsgi/com.raytheon.uf.common.datadelivery.registry/src/com/raytheon/uf/common/datadelivery/registry/Subscription.java b/edexOsgi/com.raytheon.uf.common.datadelivery.registry/src/com/raytheon/uf/common/datadelivery/registry/Subscription.java index 04df1eca63..533463d2cb 100644 --- a/edexOsgi/com.raytheon.uf.common.datadelivery.registry/src/com/raytheon/uf/common/datadelivery/registry/Subscription.java +++ b/edexOsgi/com.raytheon.uf.common.datadelivery.registry/src/com/raytheon/uf/common/datadelivery/registry/Subscription.java @@ -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. * * * @@ -730,4 +731,11 @@ public interface Subscription extends Compar * @return This subscrition's state */ SubscriptionState getSubscriptionState(); + + /** + * Check against activePeriod and Start/End of subscription + * @param checkCal + * @return + */ + boolean shouldScheduleForTime(Calendar checkCal); } \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/util/BandwidthDaoUtil.java b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/util/BandwidthDaoUtil.java index ad879e6701..dbaf01baeb 100644 --- a/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/util/BandwidthDaoUtil.java +++ b/edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/util/BandwidthDaoUtil.java @@ -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(); * * * @author djohnson @@ -229,8 +230,13 @@ public class BandwidthDaoUtil { * 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;