protected fun closeNoThrow(): Future<Void?>? { var closeFuture: Promise<Void?>? synchronized(this) { if (null != closePromise) { return closePromise } closePromise = Promise<Void>() closeFuture = closePromise } cancelTruncation() Utils.closeSequence( bkDistributedLogManager.getScheduler(), true, getCachedLogWriter(), getAllocatedLogWriter(), getCachedWriteHandler() ).proxyTo(closeFuture) return closeFuture }
Close the writer and release all the underlying resources