anon.infoservice.update
Class AbstractMixCascadeUpdater

java.lang.Object
  extended by anon.util.Updater
      extended by anon.infoservice.update.AbstractDatabaseUpdater
          extended by anon.infoservice.update.AbstractMixCascadeUpdater
All Implemented Interfaces:
java.util.Observer
Direct Known Subclasses:
Controller.MixCascadeUpdater, MixCascadeUpdater

public abstract class AbstractMixCascadeUpdater
extends AbstractDatabaseUpdater

Updates the list of available MixCascades.

Author:
Rolf Wendolsky

Nested Class Summary
 
Nested classes/interfaces inherited from class anon.util.Updater
Updater.ConstantUpdateInterval, Updater.DynamicUpdateInterval, Updater.IUpdateInterval, Updater.ObservableInfo
 
Field Summary
private  boolean m_bDoMixInfoCleanup
           
private static long MIN_UPDATE_INTERVAL_MS
           
private static long UPDATE_INTERVAL_MS
           
 
Fields inherited from class anon.infoservice.update.AbstractDatabaseUpdater
KEEP_ENTRY_FACTOR
 
Constructor Summary
AbstractMixCascadeUpdater(long interval, boolean a_bDoMixInfoCleanup, Updater.ObservableInfo a_observableInfo)
           
AbstractMixCascadeUpdater(Updater.ObservableInfo a_observableInfo)
           
 
Method Summary
protected  boolean doCleanup(java.util.Hashtable a_newEntries)
          Removes all MixInfo entries that exist without a cascade.
private  boolean fetchCurrentStatus(MixCascade a_cascade)
           
protected  java.util.Hashtable getEntrySerials()
           
protected abstract  AbstractDatabaseEntry getPreferredEntry()
           
 java.lang.Class getUpdatedClass()
           
protected  java.util.Hashtable getUpdatedEntries_internal(java.util.Hashtable a_entriesToUpdate)
           
protected  java.util.Hashtable getUpdatedEntries(java.util.Hashtable a_entriesToUpdate)
           
protected abstract  void setPreferredEntry(AbstractDatabaseEntry a_preferredEntry)
           
 
Methods inherited from class anon.infoservice.update.AbstractDatabaseUpdater
isFirstUpdateDone, protectFromCleanup, updateInternal, wasUpdateSuccessful
 
Methods inherited from class anon.util.Updater
getObservableInfo, getUpdatedClassName, getUpdateInterval, isUpdatePaused, start, stop, update, update, updateAsync
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UPDATE_INTERVAL_MS

private static final long UPDATE_INTERVAL_MS
See Also:
Constant Field Values

MIN_UPDATE_INTERVAL_MS

private static final long MIN_UPDATE_INTERVAL_MS
See Also:
Constant Field Values

m_bDoMixInfoCleanup

private boolean m_bDoMixInfoCleanup
Constructor Detail

AbstractMixCascadeUpdater

public AbstractMixCascadeUpdater(Updater.ObservableInfo a_observableInfo)

AbstractMixCascadeUpdater

public AbstractMixCascadeUpdater(long interval,
                                 boolean a_bDoMixInfoCleanup,
                                 Updater.ObservableInfo a_observableInfo)
Method Detail

getPreferredEntry

protected abstract AbstractDatabaseEntry getPreferredEntry()
Overrides:
getPreferredEntry in class AbstractDatabaseUpdater

setPreferredEntry

protected abstract void setPreferredEntry(AbstractDatabaseEntry a_preferredEntry)
Overrides:
setPreferredEntry in class AbstractDatabaseUpdater

getUpdatedClass

public final java.lang.Class getUpdatedClass()
Specified by:
getUpdatedClass in class Updater

doCleanup

protected final boolean doCleanup(java.util.Hashtable a_newEntries)
Removes all MixInfo entries that exist without a cascade.

Overrides:
doCleanup in class AbstractDatabaseUpdater
Parameters:
a_newEntries - the list of new entries
Returns:
boolean

getEntrySerials

protected final java.util.Hashtable getEntrySerials()
Specified by:
getEntrySerials in class AbstractDatabaseUpdater

getUpdatedEntries

protected java.util.Hashtable getUpdatedEntries(java.util.Hashtable a_entriesToUpdate)
Specified by:
getUpdatedEntries in class AbstractDatabaseUpdater

fetchCurrentStatus

private final boolean fetchCurrentStatus(MixCascade a_cascade)

getUpdatedEntries_internal

protected final java.util.Hashtable getUpdatedEntries_internal(java.util.Hashtable a_entriesToUpdate)