edu.sc.seis.fissuresUtil.cache
Class DataCenterRouter
java.lang.Object
edu.sc.seis.fissuresUtil.cache.DataCenterRouter
- All Implemented Interfaces:
- DataCenterOperations
- Direct Known Subclasses:
- HardCodeDataCenterRouter
public class DataCenterRouter
- extends Object
- implements DataCenterOperations
Routes data center requests to the correct datacenter. This allow the
calling object to deal with multiple datacenters without keeping track
of which networks come from which datacenters. The first datacenter to
return data for a particular request is assumed to have satisfied the
request. But if no data is returned, then the request propigates to the
next datacenter.
Created: Wed Jan 22 15:24:39 2003
- Version:
- 1.0
- Author:
- Philip Crotwell
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
netToDCMap
protected HashMap netToDCMap
unmatchedDCList
protected List unmatchedDCList
DataCenterRouter
public DataCenterRouter()
addDataCenter
public void addDataCenter(ProxySeismogramDC dc)
addDataCenter
public void addDataCenter(NetworkAccess[] net,
ProxySeismogramDC dc)
addDataCenter
public void addDataCenter(NetworkAccess net,
ProxySeismogramDC dc)
addDataCenter
public void addDataCenter(NetworkId networkId,
ProxySeismogramDC dc)
addDataCenter
public void addDataCenter(String network_code,
ProxySeismogramDC dc)
getDataCenter
public List getDataCenter(NetworkAccess net)
getDataCenter
public List getDataCenter(NetworkId networkId)
getDataCenter
public List getDataCenter(String networkCode)
getDataCenter
public List getDataCenter(ChannelId chanId)
available_data
public RequestFilter[] available_data(RequestFilter[] filters)
- Specified by:
available_data in interface DataCenterOperations
request_seismograms
public String request_seismograms(RequestFilter[] filters,
DataCenterCallBack a_client,
boolean long_lived,
Time expiration_time)
throws FissuresException
- Specified by:
request_seismograms in interface DataCenterOperations
- Throws:
FissuresException
retrieve_seismograms
public LocalSeismogram[] retrieve_seismograms(RequestFilter[] filters)
throws FissuresException
- Specified by:
retrieve_seismograms in interface DataCenterOperations
- Throws:
FissuresException
queue_seismograms
public String queue_seismograms(RequestFilter[] a_filterseq)
throws FissuresException
- Specified by:
queue_seismograms in interface DataCenterOperations
- Throws:
FissuresException
retrieve_queue
public LocalSeismogram[] retrieve_queue(String a_request)
throws FissuresException
- Specified by:
retrieve_queue in interface DataCenterOperations
- Throws:
FissuresException
cancel_request
public void cancel_request(String a_request)
throws FissuresException
- Specified by:
cancel_request in interface DataCenterOperations
- Throws:
FissuresException
request_status
public String request_status(String a_request)
throws FissuresException
- Specified by:
request_status in interface DataCenterOperations
- Throws:
FissuresException
makeMap
protected HashMap makeMap(RequestFilter[] filters)
- Sorts the request filters into Lists indexed by the list of datacenters
that support each networkId. So the keys of the map are Lists of
DataCenters, all of which support a given network. And the values of
the map is a List of RequestFilters that are for the given network.
Copyright © 2002-2007 Seismology at the University of South Carolina. All Rights Reserved.