Class SodDB

java.lang.Object
edu.sc.seis.fissuresUtil.hibernate.AbstractHibernateDB
edu.sc.seis.sod.hibernate.SodDB

public class SodDB extends edu.sc.seis.fissuresUtil.hibernate.AbstractHibernateDB
  • Field Details

  • Constructor Details

    • SodDB

      protected SodDB()
      database should use one of EventVectorPair or EventChannelPair. Using AbstractEventChannelPair results in very slow union in selects in hsqldb. By specifying which table we are using, the queries are several orders of magnitude faster and do not use huge amounts of memory, which matters a lot when the number of ecps becomes large.
  • Method Details

    • configHibernate

      public static void configHibernate(org.hibernate.cfg.Configuration config)
    • reopenSuspendedEventChannelPairs

      public void reopenSuspendedEventChannelPairs(String processingRule, boolean vector)
    • createEventNetworkPair

      public EventNetworkPair createEventNetworkPair(StatefulEvent event, edu.iris.Fissures.network.NetworkAttrImpl net)
    • offerEventNetworkPairs

      public void offerEventNetworkPairs(List<EventNetworkPair> staPairList)
    • offerEventStationPair

      public void offerEventStationPair(List<EventStationPair> staPairList)
    • offerEventChannelPair

      public void offerEventChannelPair(List<AbstractEventChannelPair> chanPairList)
    • loadESPForNetwork

      public List<EventStationPair> loadESPForNetwork(StatefulEvent event, edu.iris.Fissures.network.NetworkAttrImpl net)
    • createEventStationPair

      public EventStationPair createEventStationPair(StatefulEvent event, edu.iris.Fissures.network.StationImpl station)
    • createEventChannelPair

      public EventChannelPair createEventChannelPair(StatefulEvent event, edu.iris.Fissures.network.ChannelImpl chan, EventStationPair esp)
    • isECPTodo

      public boolean isECPTodo()
    • isESPTodo

      public boolean isESPTodo()
    • isENPTodo

      public boolean isENPTodo()
    • getNextENPFromCache

      public EventNetworkPair getNextENPFromCache()
      next successful event-network to process from cache. Returns null if no more events in cache.
    • getNextENP

      public EventNetworkPair getNextENP()
      next successful event-network to process. Returns null if no more events.
    • populateENPToDo

      public void populateENPToDo()
    • getNextESPFromCache

      public EventStationPair getNextESPFromCache()
      next successful event-station to process from memory cache. Returns null if no more esp in memory.
    • getNextESP

      public EventStationPair getNextESP()
      next successful event-station to process. Returns null if no more events.
    • populateESPToDo

      public void populateESPToDo()
    • populateECPToDo

      public void populateECPToDo()
    • getNextECPFromCache

      public AbstractEventChannelPair getNextECPFromCache()
      next successful event-station to process from memory cache. Returns null if no more esp in memory.
    • getNextECP

      public AbstractEventChannelPair getNextECP()
      next successful event-channel to process. Returns null if no more events.
    • getNextRetryECPFromCache

      public AbstractEventChannelPair getNextRetryECPFromCache()
    • isRetryTodo

      public boolean isRetryTodo()
    • getRetryToDo

      public List<AbstractEventChannelPair> getRetryToDo()
    • populateRetryToDo

      public void populateRetryToDo()
    • getNumWorkUnits

      public int getNumWorkUnits(Standing standing)
    • getNumEventNetworkWorkUnits

      public int getNumEventNetworkWorkUnits(Standing standing)
    • getECP

      public EventChannelPair getECP(edu.sc.seis.fissuresUtil.cache.CacheEvent event, edu.iris.Fissures.network.ChannelImpl chan)
    • put

      public EventVectorPair put(EventVectorPair eventVectorPair)
    • getMinRetryDelay

      public edu.iris.Fissures.model.TimeInterval getMinRetryDelay()
    • getMaxRetries

      public int getMaxRetries()
    • getNumSuccessful

      public int getNumSuccessful()
    • getNumSuccessful

      public int getNumSuccessful(edu.sc.seis.fissuresUtil.cache.CacheEvent event)
    • getNumSuccessful

      public int getNumSuccessful(edu.iris.Fissures.network.StationImpl station)
    • getNumSuccessful

      public int getNumSuccessful(edu.sc.seis.fissuresUtil.cache.CacheEvent event, edu.iris.Fissures.network.StationImpl station)
    • getNumFailed

      public int getNumFailed(edu.iris.Fissures.network.StationImpl station)
    • getNumFailed

      public int getNumFailed(edu.sc.seis.fissuresUtil.cache.CacheEvent event, edu.iris.Fissures.network.StationImpl station)
    • getNumFailed

      public int getNumFailed(edu.sc.seis.fissuresUtil.cache.CacheEvent event)
    • getNumRetry

      public int getNumRetry(edu.iris.Fissures.network.StationImpl station)
    • getNumRetry

      public int getNumRetry(edu.sc.seis.fissuresUtil.cache.CacheEvent event)
    • getNumRetry

      public int getNumRetry(edu.sc.seis.fissuresUtil.cache.CacheEvent event, edu.iris.Fissures.network.StationImpl station)
    • getAll

      public List<AbstractEventChannelPair> getAll(edu.sc.seis.fissuresUtil.cache.CacheEvent event)
    • getSuccessful

      public List<AbstractEventChannelPair> getSuccessful(edu.sc.seis.fissuresUtil.cache.CacheEvent event)
    • getSuccessful

      public List<AbstractEventChannelPair> getSuccessful(edu.iris.Fissures.network.StationImpl station)
    • getSuccessful

      public List<AbstractEventChannelPair> getSuccessful(edu.sc.seis.fissuresUtil.cache.CacheEvent event, edu.iris.Fissures.network.StationImpl station)
    • getFailed

      public List<AbstractEventChannelPair> getFailed(edu.iris.Fissures.network.StationImpl station)
    • getFailed

      public List<AbstractEventChannelPair> getFailed(edu.sc.seis.fissuresUtil.cache.CacheEvent event, edu.iris.Fissures.network.StationImpl station)
    • getFailed

      public List<AbstractEventChannelPair> getFailed(edu.sc.seis.fissuresUtil.cache.CacheEvent event)
    • getRetry

      public List<AbstractEventChannelPair> getRetry(edu.iris.Fissures.network.StationImpl station)
    • getRetry

      public List<AbstractEventChannelPair> getRetry(edu.sc.seis.fissuresUtil.cache.CacheEvent event)
    • getRetry

      public List<AbstractEventChannelPair> getRetry(edu.sc.seis.fissuresUtil.cache.CacheEvent event, edu.iris.Fissures.network.StationImpl station)
    • getStationsForEvent

      public List<edu.iris.Fissures.network.StationImpl> getStationsForEvent(edu.sc.seis.fissuresUtil.cache.CacheEvent event)
    • getSuccessfulStationsForEvent

      public List<edu.iris.Fissures.network.StationImpl> getSuccessfulStationsForEvent(edu.sc.seis.fissuresUtil.cache.CacheEvent event)
    • getUnsuccessfulStationsForEvent

      public List<edu.iris.Fissures.network.StationImpl> getUnsuccessfulStationsForEvent(edu.sc.seis.fissuresUtil.cache.CacheEvent event)
    • getEventsForStation

      public List<edu.sc.seis.fissuresUtil.cache.CacheEvent> getEventsForStation(edu.iris.Fissures.network.StationImpl sta)
    • getSuccessfulEventsForStation

      public List<edu.sc.seis.fissuresUtil.cache.CacheEvent> getSuccessfulEventsForStation(edu.iris.Fissures.network.StationImpl sta)
    • getUnsuccessfulEventsForStation

      public List<edu.sc.seis.fissuresUtil.cache.CacheEvent> getUnsuccessfulEventsForStation(edu.iris.Fissures.network.StationImpl sta)
    • put

      public long put(RecordSectionItem item)
    • getRecordSectionItemForEvent

      public RecordSectionItem getRecordSectionItemForEvent(edu.sc.seis.fissuresUtil.cache.CacheEvent event, edu.iris.Fissures.network.ChannelImpl channel)
    • getRecordSectionId

      public List<String> getRecordSectionId(edu.sc.seis.fissuresUtil.cache.CacheEvent event)
      Finds the recordsectionids for this event
    • getRecordSectionOrientations

      public List<String> getRecordSectionOrientations(edu.sc.seis.fissuresUtil.cache.CacheEvent event)
      Finds the recordsection orientationids for this event
    • getRecordSectionItem

      public RecordSectionItem getRecordSectionItem(String orientationId, String recordSectionId, edu.sc.seis.fissuresUtil.cache.CacheEvent event, edu.iris.Fissures.network.ChannelImpl channel)
    • getStationsForRecordSection

      public List<edu.iris.Fissures.network.StationImpl> getStationsForRecordSection(String orientationId, String recordSectionId, edu.sc.seis.fissuresUtil.cache.CacheEvent event, boolean best)
    • getChannelsForRecordSection

      public List<edu.iris.Fissures.network.ChannelImpl> getChannelsForRecordSection(String orientationId, edu.sc.seis.fissuresUtil.cache.CacheEvent event, boolean best)
    • getBestForRecordSection

      public List<RecordSectionItem> getBestForRecordSection(String orientationId, String recordSectionId, edu.sc.seis.fissuresUtil.cache.CacheEvent event)
    • updateBestForRecordSection

      public boolean updateBestForRecordSection(String orientationId, String recordSectionId, edu.sc.seis.fissuresUtil.cache.CacheEvent event, edu.iris.Fissures.IfNetwork.ChannelId[] channelIds)
    • getRecordSectionItemList

      public List<RecordSectionItem> getRecordSectionItemList(String orientationId, String recordSectionId, edu.sc.seis.fissuresUtil.cache.CacheEvent event)
    • recordSectionsForEvent

      public List<RecordSectionItem> recordSectionsForEvent(edu.sc.seis.fissuresUtil.cache.CacheEvent event)
    • putConfig

      public int putConfig(SodConfig sodConfig)
    • getCurrentConfig

      public SodConfig getCurrentConfig()
    • getConfig

      public SodConfig getConfig(int configid)
    • getQueryTime

      public QueryTime getQueryTime(String serverName, String serverDNS)
    • putQueryTime

      public int putQueryTime(QueryTime qtime)
    • getDBVersion

      public Version getDBVersion()
    • putDBVersion

      protected Version putDBVersion()
    • initHQLStmts

      public void initHQLStmts()
    • discoverDbEcpClass

      public static Class<? extends AbstractEventChannelPair> discoverDbEcpClass()
    • setDefaultEcpClass

      public static void setDefaultEcpClass(Class<? extends AbstractEventChannelPair> ecpClass)
    • getEcpClass

      public Class<? extends AbstractEventChannelPair> getEcpClass()
    • getSingleton

      public static SodDB getSingleton()