ProtobufMessages.Timers.Builder _timers = ProtobufMessages.Timers.newBuilder();
for ( TimerJobInstance timer : sortedTimers ) {
JobContext jctx = ((SelfRemovalJobContext) timer.getJobContext()).getJobContext();
TimersOutputMarshaller writer = outCtx.writersByClass.get( jctx.getClass() );
Timer _timer = writer.serialize( jctx, outCtx );
_timers.addTimer( _timer );
}
return _timers.build();
}
return null;