mondrian.server
Class DynamicContentFinder

java.lang.Object
  extended by mondrian.server.UrlRepositoryContentFinder
      extended by mondrian.server.DynamicContentFinder
All Implemented Interfaces:
RepositoryContentFinder

public class DynamicContentFinder
extends UrlRepositoryContentFinder

Implementation of RepositoryContentFinder that periodically reloads the content of the repository.

The updates are performed by a background thread. It is important to call shutdown() once this object can be disposed of.

Author:
Thiyagu Ajit, Luc Boudreau, Julian Hyde

Field Summary
protected  DataSourcesConfig.DataSources dataSources
           
protected  String lastDataSourcesConfigString
           
 
Fields inherited from class mondrian.server.UrlRepositoryContentFinder
url
 
Constructor Summary
DynamicContentFinder(String dataSourcesConfigUrl)
          Creates a DynamicContentFinder.
 
Method Summary
static boolean areCatalogsEqual(DataSourcesConfig.DataSource dataSource1, DataSourcesConfig.Catalog catalog1, DataSourcesConfig.DataSource dataSource2, DataSourcesConfig.Catalog catalog2)
           
static String dsi(DataSourcesConfig.DataSource dataSource, DataSourcesConfig.Catalog catalog)
           
protected  void flushCatalog(String catalogName)
           
 void flushObsoleteCatalogs(DataSourcesConfig.DataSources newDataSources)
           
protected  boolean hasDataSourcesContentChanged(String dataSourcesConfigString)
           
 void reloadDataSources()
          Checks for updates to datasources content, flushes obsolete catalogs.
 void shutdown()
          Cleans up all background updating jobs.
 
Methods inherited from class mondrian.server.UrlRepositoryContentFinder
getContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lastDataSourcesConfigString

protected String lastDataSourcesConfigString

dataSources

protected DataSourcesConfig.DataSources dataSources
Constructor Detail

DynamicContentFinder

public DynamicContentFinder(String dataSourcesConfigUrl)
Creates a DynamicContentFinder.

Parameters:
dataSourcesConfigUrl - URL of repository
Method Detail

shutdown

public void shutdown()
Cleans up all background updating jobs.

Specified by:
shutdown in interface RepositoryContentFinder
Overrides:
shutdown in class UrlRepositoryContentFinder

reloadDataSources

public void reloadDataSources()
Checks for updates to datasources content, flushes obsolete catalogs.


hasDataSourcesContentChanged

protected boolean hasDataSourcesContentChanged(String dataSourcesConfigString)

flushObsoleteCatalogs

public void flushObsoleteCatalogs(DataSourcesConfig.DataSources newDataSources)

flushCatalog

protected void flushCatalog(String catalogName)

areCatalogsEqual

public static boolean areCatalogsEqual(DataSourcesConfig.DataSource dataSource1,
                                       DataSourcesConfig.Catalog catalog1,
                                       DataSourcesConfig.DataSource dataSource2,
                                       DataSourcesConfig.Catalog catalog2)

dsi

public static String dsi(DataSourcesConfig.DataSource dataSource,
                         DataSourcesConfig.Catalog catalog)

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads