Prevent custom aggregated object from being serialized and send to ActivePivot Live

StackOverflow https://stackoverflow.com/questions/17724129

  •  03-06-2022
  •  | 
  •  

Frage

We are aggregating some large matrices and have a custom Matrix class. These are aggregated with a custom aggregation function. A formatter takes care of showing part of the aggregated matrix measure for debugging, but it seems that even with a formatter in place, the entire Matrix, is still serialized and send to Live when that measure is shown. Is there a way to avoid that?

War es hilfreich?

Lösung

You should be able to do your formatting in a basic post-processor, taking in underlying value your matrix and returning the formatted value you wish to display. Then you can use this new measure instead of the previous one

Andere Tipps

The David's solution is a good one. An other one is to implement the Externalizable interface with your custom Matrix class and write dummy overridden methods for void writeExternal(ObjectOutput out) and void readExternal(ObjectInput in). By this way, only the formatted value of the matrix will be serialized and send to Live. However, if you need the whole value of the matrix somewhere else, you won't be able to get it anymore. In this case, you had better use the David's solution.

Paul

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top