public boolean matchCompleteTransactionTask ( long txnId , long timestamp ) { if ( ! m_compTasks . isEmpty ( ) ) { long lowestTxnId = m_compTasks . firstKey ( ) ; if ( txnId == lowestTxnId ) { Pair < CompleteTransactionTask , Boolean > pair = m_compTasks . get ( lowestTxnId ) ; return timestamp == pair . getFirst ( ) . getTimestamp ( ) ; } } return false ; }
Only match CompleteTransactionTask at head of the queue