private void findAfterLocal ( Result < Cursor > result , RowCursor cursor , Object [ ] args , Cursor cursorLocal ) { long version = 0 ; if ( cursorLocal != null ) { version = cursorLocal . getVersion ( ) ; long time = cursorLocal . getUpdateTime ( ) ; long timeout = cursorLocal . getTimeout ( ) ; long now = CurrentTime . currentTime ( ) ; if ( now <= time + timeout ) { result . ok ( cursorLocal ) ; return ; } } TablePod tablePod = _table . getTablePod ( ) ; tablePod . getIfUpdate ( cursor . getKey ( ) , version , result . then ( ( table , r ) -> _selectQueryLocal . findOne ( r , args ) ) ) ; }
After finding the local cursor if it s expired check with the cluster to find the most recent value .