getConfig() is, I believe, returning something populated via setup.  So, we should be able to override setup, and do

super.setup();
Granularity gran = getConfig().getRollupSpec().getRollupGranularity();

And then this code is just gran.truncate.