protected Future < ? > getFuture ( ) { long stamp = lock . tryOptimisticRead ( ) ; Future < ? > future = this . future ; if ( ! lock . validate ( stamp ) ) { // Not valid so wait for read lock stamp = lock . readLock ( ) ; try { future = this . future ; } finally { lock . unlockRead ( stamp ) ; } } return future ; }
Gets the future associated to the action task .