@ file : Jvm Name (" Kafka Future Ext ") Ċ package Ġcom . github . nom is Rev . kafka Ċ Ċ import Ġkotlinx . coroutines . Deferred Ċ import Ġkotlinx . coroutines . Internal Cor outines Api Ċ import Ġkotlinx . coroutines . future . as Deferred Ċ import Ġkotlinx . coroutines . future . await Ċ import Ġorg . apache . kafka . clients . admin . Create Topics Result Ċ import Ġorg . apache . kafka . clients . admin . Delete Topics Result Ċ import Ġorg . apache . kafka . common . Kafka Future Ċ Ċ /** ĠAwait Ġall Ġ[ Delete Topics Result ] Ġin Ġa Ġsus pending Ġway . Ġ*/ Ċ public Ġsuspend Ġfun ĠDelete Topics Result . await () Ġ{ ĊĠ Ġall (). await () Ċ } Ċ Ċ /** ĠAwait Ġall Ġ[ Create Topics Result ] Ġin Ġa Ġsus pending Ġway . Ġ*/ Ċ public Ġsuspend Ġfun ĠCreate Topics Result . await () Ġ{ ĊĠ Ġall (). await () Ċ } Ċ Ċ /** Ċ Ġ* ĠAwait Ġa Ġ[ Kafka Future ] Ġin Ġa Ġsus pending Ġway . ĠCode Ġinspired Ġby Ċ Ġ* Ġ[ Kotlin X ĠCor outines ĠJDK 8 ]( https :// github . com / Kotlin / kotlin x . coroutines / tree / master / integration / kotlin x - coroutines - jdk 8 ) Ċ Ġ*/ Ċ public Ġsuspend Ġfun Ġ< T > ĠKafka Future < T >. await (): ĠT Ġ= ĊĠ Ġto Completion Stage (). await () Ċ Ċ /** Ċ Ġ* ĠConverts Ġthis Ġ[ Kafka Future ] Ġto Ġan Ġinstance Ġof Ġ[ Deferred ]. Ċ Ġ* Ċ Ġ* ĠThe Ġ[ Kafka Future ] Ġis Ġcancelled Ġwhen Ġthe Ġresulting Ġdeferred Ġis Ġcancelled . Ċ Ġ*/ Ċ @ Opt In ( Internal Cor outines Api :: class ) Ċ @ Suppress (" Deferred Is Result ") Ċ public Ġfun Ġ< T > ĠKafka Future < T >. as Deferred (): ĠDeferred < T > Ġ= ĊĠ Ġto Completion Stage (). as Deferred () Ċ