@ SuppressWarnings ( "unchecked" ) public < T > DistributedFuture < GROUP , T > createFuture ( HazeltaskTask < GROUP > task ) { DistributedFuture < GROUP , T > future = new DistributedFuture < GROUP , T > ( topologyService , task . getGroup ( ) , task . getId ( ) ) ; this . futures . put ( task . getId ( ) , ( DistributedFuture < GROUP , Serializable > ) future ) ; return future ; }
It is required that T be Serializable