Issue #2678 Better fix for sbn retrieval queue init to null in wfo. Fix for bandwith graph data retrieve of sbn data.

Amend:  updated commit comment in BandwidthGraphData.

Change-Id: Ic77130425e495330fe670086e5bbfad35e7b9287

Former-commit-id: 6b8da117e4 [formerly 061884910d [formerly 0635a368c6] [formerly 6b8da117e4 [formerly 253b19d5cd1c7950209521a708b5ad9abbf000f6]]]
Former-commit-id: 061884910d [formerly 0635a368c6]
Former-commit-id: 061884910d
Former-commit-id: 63da94f3dc
This commit is contained in:
Brad Gonzales 2014-01-17 16:25:46 -06:00
parent 05ab39279b
commit ed203ce2c7
3 changed files with 16 additions and 14 deletions

View file

@ -52,6 +52,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Nov 19, 2013 2545 bgonzale Added 'add' method stub. Still work to do.
* Nov 25, 2013 2545 mpduff Finished implementing 2545.
* Dec 11, 2013 2625 mpduff Add error handling for no data conditions.
* Jan 17, 2014 2678 bgonzale Changed merge to not check for existing network
* mapping since SBN will be in the OPSNET mapping
*
* </pre>
*
@ -345,7 +347,7 @@ public class BandwidthGraphData {
}
/**
* Merge another Bandwidth graph data into this object.
* Merge another Bandwidth graph data over the data in this object.
*
* @param data2
* The other data set to merge
@ -355,18 +357,14 @@ public class BandwidthGraphData {
.getNetworkBucketMap();
for (Network network : nbm.keySet()) {
if (!networkBucketMap.containsKey(network)) {
networkBucketMap.put(network, nbm.get(network));
}
networkBucketMap.put(network, nbm.get(network));
}
Map<Network, List<SubscriptionWindowData>> ndm = data2
.getNetworkDataMap();
for (Network network : ndm.keySet()) {
if (!networkDataMap.containsKey(network)) {
networkDataMap.put(network, ndm.get(network));
}
networkDataMap.put(network, ndm.get(network));
}
}
}

View file

@ -61,7 +61,6 @@
<constructor-arg ref="bandwidthDao" />
<constructor-arg ref="retrievalDao" />
<constructor-arg ref="ProviderHandler" />
<constructor-arg ref="retrievalQueue" />
</bean>
<util:map id="retrievalAgents">

View file

@ -55,6 +55,7 @@ import com.raytheon.uf.edex.datadelivery.retrieval.db.RetrievalRequestRecordPK;
* Jul 11, 2013 2106 djohnson Use SubscriptionPriority enum.
* Jan 15, 2014 2678 bgonzale Use Queue for passing RetrievalRequestRecords to the
* RetrievalTasks (PerformRetrievalsThenReturnFinder).
* Added constructor that sets the retrievalQueue to null.
*
* </pre>
*
@ -78,6 +79,15 @@ public class SubscriptionRetrievalAgent extends
private final ConcurrentLinkedQueue<RetrievalRequestRecordPK> retrievalQueue;
public SubscriptionRetrievalAgent(Network network, String destinationUri,
final Object notifier, int defaultPriority,
RetrievalManager retrievalManager, IBandwidthDao bandwidthDao,
IRetrievalDao retrievalDao, IProviderHandler providerHandler) {
this(network, destinationUri, notifier, defaultPriority,
retrievalManager, bandwidthDao, retrievalDao, providerHandler,
null);
}
public SubscriptionRetrievalAgent(Network network, String destinationUri,
final Object notifier, int defaultPriority,
RetrievalManager retrievalManager, IBandwidthDao bandwidthDao,
@ -88,12 +98,7 @@ public class SubscriptionRetrievalAgent extends
this.bandwidthDao = bandwidthDao;
this.retrievalDao = retrievalDao;
this.providerHandler = providerHandler;
// SBN retrievals come from ingest processing
if (network.equals(Network.SBN)) {
this.retrievalQueue = null;
} else {
this.retrievalQueue = retrievalQueue;
}
this.retrievalQueue = retrievalQueue;
}
@Override