package Ġcom . rar ible . protocol . nft order . core . service Ċ Ċ import Ġcom . rar ible . core . common . now Millis Ċ import Ġcom . rar ible . protocol . nft order . core . model . ItemId Ċ import Ġcom . rar ible . protocol . nft order . core . util . spent Ċ import Ġcom . rar ible . protocol . unlock able . api . client . Lock Controller Api Ċ import Ġkotlinx . coroutines . reactive . await FirstOrDefault Ċ import Ġorg . slf 4 j . LoggerFactory Ċ import Ġorg . springframework . stereotype . Component Ċ Ċ @ Component Ċ class ĠLock Service ( ĊĠĠĠ Ġprivate Ġval Ġlock Controller Api : ĠLock Controller Api Ċ ) Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġlogger Ġ= ĠLoggerFactory . getLogger ( Lock Service :: class . java ) ĊĊĠĠĠ Ġsuspend Ġfun Ġis Unlock able ( itemId : ĠItem Id ): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġnow Ġ= Ġnow Millis () ĊĠĠĠĠĠĠĠ Ġval Ġresult Ġ= Ġlock Controller Api ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. is Unlock able ( itemId . decimal StringValue ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. await FirstOrDefault ( false ) ĊĠĠĠĠĠĠĠ Ġlogger . info (" F etched ĠUn lock able Ġmarker Ġfor ĠItem Ġ[ {} ]: Ġ[ {}] Ġ( {} ms )", ĠitemId , Ġresult , Ġspent ( now )) ĊĠĠĠĠĠĠĠ Ġreturn Ġresult ĊĠĠĠ Ġ} Ċ Ċ }