Examples of cacheEnabled()


Examples of org.pentaho.platform.api.engine.ICacheManager.cacheEnabled()

  // ~ Methods =========================================================================================================

  protected synchronized void init( final IPentahoSession pentahoSession ) {
    // First check if the catalogs are initialized for the current locale
    final ICacheManager cacheMgr = PentahoSystem.getCacheManager( pentahoSession );
    if ( cacheMgr.cacheEnabled( MONDRIAN_CATALOG_CACHE_REGION )
      && cacheMgr.getFromRegionCache( MONDRIAN_CATALOG_CACHE_REGION, getLocale().toString() ) != null ) {
      return;
    }
    if ( MondrianCatalogHelper.logger.isDebugEnabled() ) {
      MondrianCatalogHelper.logger.debug( "init" ); //$NON-NLS-1$
View Full Code Here

Examples of org.pentaho.platform.api.engine.ICacheManager.cacheEnabled()

    AggregationManager.instance().getCacheControl( null, null ).flushSchemaCache();
  }

  public synchronized void reInit( final IPentahoSession pentahoSession ) {
    final ICacheManager cacheMgr = PentahoSystem.getCacheManager( pentahoSession );
    if ( cacheMgr.cacheEnabled( MONDRIAN_CATALOG_CACHE_REGION ) ) {
      cacheMgr.clearRegionCache( MONDRIAN_CATALOG_CACHE_REGION );
    }
    init( pentahoSession );
  }
View Full Code Here

Examples of org.pentaho.platform.api.engine.ICacheManager.cacheEnabled()

  protected void loadCatalogsIntoCache( final DataSourcesConfig.DataSources dataSources,
                                        final IPentahoSession pentahoSession ) {

    // Create the cache region if necessary.
    ICacheManager cacheMgr = PentahoSystem.getCacheManager( pentahoSession );
    if ( !cacheMgr.cacheEnabled( MONDRIAN_CATALOG_CACHE_REGION ) ) {
      // Create the region
      cacheMgr.addCacheRegion( MONDRIAN_CATALOG_CACHE_REGION );
    }
    if ( cacheMgr.getFromRegionCache( MONDRIAN_CATALOG_CACHE_REGION, getLocale().toString() ) == null ) {
      // Put the map in the region
View Full Code Here

Examples of org.pentaho.platform.api.engine.ICacheManager.cacheEnabled()

  protected ICacheManager addCacheRegions() {
    ICacheManager cacheManager = PentahoSystem.getCacheManager( null );

    Logger.debug( this, "Adding caching regions ..." ); //$NON-NLS-1$

    if ( !cacheManager.cacheEnabled( IDBDatasourceService.JDBC_DATASOURCE ) ) {
      cacheManager.addCacheRegion( IDBDatasourceService.JDBC_DATASOURCE );
    }

    return cacheManager;
  }
View Full Code Here

Examples of org.pentaho.platform.api.engine.ICacheManager.cacheEnabled()

  @Override
  protected ICacheManager addCacheRegions( ) {

    ICacheManager cacheManager = super.addCacheRegions();

    if ( !cacheManager.cacheEnabled( IDBDatasourceService.JDBC_POOL ) ) {
      cacheManager.addCacheRegion( IDBDatasourceService.JDBC_POOL );
    }

    return cacheManager;
  }
View Full Code Here

Examples of org.pentaho.platform.api.engine.ICacheManager.cacheEnabled()

    final Lock writeLock = cacheLock.writeLock();
    try {

      writeLock.lock();

      if ( !cacheMgr.cacheEnabled( CATALOG_CACHE_REGION ) ) {
        // Create the region. This requires write access.
        cacheMgr.addCacheRegion( CATALOG_CACHE_REGION );
      }

      if ( cacheMgr.getFromRegionCache( CATALOG_CACHE_REGION, cacheKey ) == null ) {
View Full Code Here

Examples of org.pentaho.platform.api.engine.ICacheManager.cacheEnabled()

    // Make sure we have a cache first...
    ICacheManager cacheManager = PentahoSystem.getCacheManager( null ); // TODO sbarkdull, need to get real session in
                                                                        // here
    Assert.assertNotNull( cacheManager );
    Assert.assertTrue( cacheManager.cacheEnabled() );

    // Test Session Based Caching
    StandaloneSession userSession1 = new StandaloneSession( "Standalone Session", "1234-5678-90" ); //$NON-NLS-1$ //$NON-NLS-2$
    StandaloneSession userSession2 = new StandaloneSession( "Standalone Session", "abc-def-ghi-jkl" ); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

Examples of org.pentaho.platform.api.engine.ICacheManager.cacheEnabled()

    // Make sure we have a cache first...
    ICacheManager cacheManager = PentahoSystem.getCacheManager( null ); // TODO sbarkdull, need to get real session in
                                                                        // here
    Assert.assertNotNull( cacheManager );
    Assert.assertTrue( cacheManager.cacheEnabled() );

    // Test Session Based Caching
    StandaloneSession userSession1 = new StandaloneSession( "Standalone Session", "1234-5678-90" ); //$NON-NLS-1$ //$NON-NLS-2$
    StandaloneSession userSession2 = new StandaloneSession( "Standalone Session", "abc-def-ghi-jkl" ); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.