final ScheduleContext rollupContext = new ScheduleContext(System.currentTimeMillis(), Util.parseShards("NONE"));
// construct the ingestion writer.
ClassLoader loader = IMetricsWriter.class.getClassLoader();
Class writerImpl = loader.loadClass(ingestConfiguration.getMetricsWriterClass());
IMetricsWriter writer = (IMetricsWriter) writerImpl.newInstance();
// state management for active shards, slots, etc.
ShardStateIO shardstateIO = new AstyanaxShardStateIO(); // todo: use configuration setting.
StateManager stateManager = new StateManager(rollupContext, shardstateIO);