@Override
    public void retireApi(Api api, IAsyncResultHandler<Void> handler) {
        objectMap.remove(getApiIndex(api), handleSuccessfulResult(handler, deletedApi -> {
            if (deletedApi == null) {
                Exception ex = new ApiNotFoundException(Messages.i18n.format("InMemoryRegistry.ApiNotFound"));
                handler.handle(AsyncResultImpl.create(ex));
            } else {
                handler.handle(AsyncResultImpl.create((Void) null));
            }
        }));
    }
@author Marc Savy {@literal <marc@rhymewithgravy.com>}
gateway/engine/vertx-shareddata/src/main/java/io/apiman/gateway/engine/vertx/shareddata/SharedGlobalDataRegistry.java