Menu

Cache?

2008-06-05
2012-10-08
  • Andres Gomez

    Andres Gomez - 2008-06-05

    Hello,

    How can implement a cache control to update the data from database, using Olap4j?

    I dont find any documentation for this purpose, just for mondrian.

    Thanks

     
    • Luc Boudreau

      Luc Boudreau - 2008-06-05

      Olap4j was never meant to be a caching API. It was deliberately left out of the specification. You can find information on this in the official specification, section 5 :

      ==========================================================================================

      1. Non-functionality

      Here are some of the areas of functionality which will not be part of olap4j:

      * Schema reader parses an XML file to create a schema
      * Cache management functions
      * Ability to create/modify schema dynamically
      * Definitions of MDX functions (such as the number and types of parameters)
      * SPI to extend the system by creating user-defined functions and so forth
      * XML/A bridge (to make an olap4j data source appear as an XML/A server)
      * SchemaReader
      

      ==========================================================================================

      The complete specification can be found at :

      http://olap4j.svn.sourceforge.net/viewvc/checkout/olap4j/trunk/doc/olap4j_fs.html

       
      • Julian Hyde

        Julian Hyde - 2008-06-05

        Luc is correct. Cache control is mondrian-specific and therefore has no place in the olap4j API. You can obtain the underlying mondrian connection object using unwrap:

        org.olap4j.OlapConnection connection;
        mondrian.olap.Connection mondrianConnection = connection.unwrap(mondrian.olap.Connection.class);
        mondrian.olap.CacheControl cacheControl = mondrianConnection.getCacheControl();

        Julian

         
        • RadhaRanjan Madhav

          I was wondering if its appropriate to use mondrian.olap.* considering the release note for 3.0.3.X mentions following :

          Mondrian's previous API (classes in the mondrian.olap package) still exists but is deprecated; from mondrian-3.1 onwards, classes and methods in this API may not exist, may not work, or may change.

           
          • Julian Hyde

            Julian Hyde - 2008-07-03

            mondrian.olap.CacheControl is part of mondrian's public interface, will remain so, and will continue to be supported as such.

            Went I said 'Mondrian's previous API (classes in the mondrian.olap package)' I was referring to classes for connections, statements, result sets, metadata, and parse tree manipulation: the areas that are common to all OLAP servers, not specific to mondrian, and are therefore part of olap4j.

            By the way, the mondrian.rolap package is not part of mondrian's public API, and never has been. Classes in that package are subject to change without notice.

            There are APIs and SPIs in mondrian to access mondrian-specific functionality. Examples are the cache-control API, and SPIs for creating user-defined functions, dynamic schema processors, cell formatters, and so forth. If we change any of those interfaces, we will continue to follow best practices for public interfaces: plenty of advance consultation and warning, documentation of the change in release notes, and non-backwards compatible changes only in major releases.

            With a few exceptions, mondrian's are in the mondrian.spi package. We know that it is difficult to build extensions to mondrian, so we are committed to keeping classes/interfaces in that package very stable.

            It's long overdue that mondrian has a document describing its public interfaces. I will take that on.

            Julian

             
    • Andres Gomez

      Andres Gomez - 2008-06-05

      Thanks for replay,

      It means that i can't use the CacheControl mondrian class to update the data cache.

      Is it posible?, How?

       
    • Luc Boudreau

      Luc Boudreau - 2008-06-05

      I only worked with the XML/A driver. Maybe Julian could propose some workarround related to Mondrian itself.

       
    • Andres Gomez

      Andres Gomez - 2008-06-06

      Ok, Julian and Luc,

      Thanks for reply.

       

Log in to post a comment.