Search in sources :

Example 1 with MDXLookupRule

use of org.pentaho.platform.plugin.action.mdx.MDXLookupRule in project pentaho-platform by pentaho.

the class MondrianFlushCacheComponent method executeAction.

public boolean executeAction() {
    MDXLookupRule mdxLookupRule = getLookupRule();
    Connection conn = ((MDXConnection) mdxLookupRule.shareConnection()).getConnection();
    CacheControl cacheControl = conn.getCacheControl(null);
    Cube[] cubes = conn.getSchema().getCubes();
    for (Cube cube : cubes) {
        cacheControl.flush(cacheControl.createMeasuresRegion(cube));
    }
    cacheControl.flushSchema(conn.getSchema());
    return true;
}
Also used : MDXLookupRule(org.pentaho.platform.plugin.action.mdx.MDXLookupRule) MDXConnection(org.pentaho.platform.plugin.services.connections.mondrian.MDXConnection) Cube(mondrian.olap.Cube) Connection(mondrian.olap.Connection) MDXConnection(org.pentaho.platform.plugin.services.connections.mondrian.MDXConnection) CacheControl(mondrian.olap.CacheControl)

Aggregations

CacheControl (mondrian.olap.CacheControl)1 Connection (mondrian.olap.Connection)1 Cube (mondrian.olap.Cube)1 MDXLookupRule (org.pentaho.platform.plugin.action.mdx.MDXLookupRule)1 MDXConnection (org.pentaho.platform.plugin.services.connections.mondrian.MDXConnection)1