private void doPeriodicWork ( final long now ) { if ( m_lastKnownSchedule == null ) { setState ( State . STARTUP ) ; return ; } if ( m_frequencyUnit == null ) { return ; } if ( m_state == State . STARTUP ) { initiateSnapshotScan ( ) ; } else if ( m_state == State . SCANNING ) { RateLimitedLogger . tryLogForMessage ( System . currentTimeMillis ( ) , 5 , TimeUnit . MINUTES , SNAP_LOG , Level . INFO , "Blocked in scanning" ) ; return ; } else if ( m_state == State . WAITING ) { processWaitingPeriodicWork ( now ) ; } else if ( m_state == State . SNAPSHOTTING ) { return ; } else if ( m_state == State . DELETING ) { return ; } }
Invoked by the client interface occasionally . Returns null if nothing needs to be done or the name of a sysproc along with procedure parameters if there is work to be done . Responses come back later via invocations of processClientResponse