private boolean waitTheMinimalDurationToExecuteTheNextProvisioningRequest ( ) { if ( m_lastGetShardIteratorRequestTime != null ) { long delay = m_durationBetweenRequests . get ( ) - ( System . currentTimeMillis ( ) - m_lastGetShardIteratorRequestTime ) ; if ( delay > 0 ) { try { Thread . sleep ( delay ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; return false ; } } } m_lastGetShardIteratorRequestTime = System . currentTimeMillis ( ) ; return true ; }
Wait that the minimum duration between two GetShardIteratorRequests has elapsed .