public void registerOngoingOperation ( final K operationKey , final CompletableFuture < R > operationResultFuture ) { final ResultAccessTracker < R > inProgress = ResultAccessTracker . inProgress ( ) ; registeredOperationTriggers . put ( operationKey , inProgress ) ; operationResultFuture . whenComplete ( ( result , error ) -> { if ( error == null ) { completedOperations . put ( operationKey , inProgress . finishOperation ( Either . Right ( result ) ) ) ; } else { completedOperations . put ( operationKey , inProgress . finishOperation ( Either . Left ( error ) ) ) ; } registeredOperationTriggers . remove ( operationKey ) ; } ) ; }
Registers an ongoing operation with the cache .