Class CopperToService


  • public class CopperToService
    extends com.activeviam.copper.measure.CopperMeasureCombination
    This Copper class exposes the references to the following references : + IActivePivot activePivot + IDatastoreVersion datastore + IQueryCache cache It should be used with the following syntax : CopperMeasure m = CopperToService.combine([copper measures]).map((activePivot, datastore, cache, data) -> ...); it is almost the same syntax as the one used for the vanilla map function except the 3 additional parameters.
    • Method Detail

      • combine

        public static CopperToService combine​(com.activeviam.copper.api.CopperMeasure... measures)
        This is the main function that should be called first
        Parameters:
        measures - Vanilla copper measures that will be exposed on the map function.
        Returns:
        The service that could have the specific map method
      • map

        public com.activeviam.copper.api.CopperMeasure map​(CopperToService.ICallback mapper)
        This is the function we want to expose the cube, store and cache
        Parameters:
        mapper - The lambda function that will have cube, store, cache and copper metric as parameters
        Returns:
        A vanilla copper measure