Source:
private GrpcRpcContainer setupContainer() { final GrpcRpcContainer container = new GrpcRpcContainer(); container.register(GrpcRpcProtocol.METADATA, empty -> { return async.resolved(metadataProvider.getMetadata()); }); container.register(GrpcRpcProtocol.METRICS_FULL_QUERY, g -> g.apply(metrics, MetricBackendGroup::query) ); container.register(GrpcRpcProtocol.METRICS_WRITE, g -> g.apply(metrics, MetricBackend::write) ); container.register(GrpcRpcProtocol.METADATA_FIND_TAGS, g -> g.apply(metadata, MetadataBackend::findTags) ); container.register(GrpcRpcProtocol.METADATA_FIND_KEYS, g -> g.apply(metadata, MetadataBackend::findKeys) ); container.register(GrpcRpcProtocol.METADATA_FIND_SERIES, g -> g.apply(metadata, MetadataBackend::findSeries) ); container.register(GrpcRpcProtocol.METADATA_COUNT_SERIES, g -> g.apply(metadata, MetadataBackend::countSeries) ); container.register(GrpcRpcProtocol.METADATA_WRITE, g -> g.apply(metadata, MetadataBackend::write) ); container.register(GrpcRpcProtocol.METADATA_DELETE_SERIES, g -> g.apply(metadata, MetadataBackend::deleteSeries) ); container.register(GrpcRpcProtocol.SUGGEST_TAG_KEY_COUNT, g -> g.apply(suggest, SuggestBackend::tagKeyCount) ); container.register(GrpcRpcProtocol.SUGGEST_TAG, g -> g.apply(suggest, SuggestBackend::tagSuggest) ); container.register(GrpcRpcProtocol.SUGGEST_KEY, g -> g.apply(suggest, SuggestBackend::keySuggest) ); container.register(GrpcRpcProtocol.SUGGEST_TAG_VALUES, g -> g.apply(suggest, SuggestBackend::tagValuesSuggest) ); container.register(GrpcRpcProtocol.SUGGEST_TAG_VALUE, g -> g.apply(suggest, SuggestBackend::tagValueSuggest) ); return container; }

Target:
private GrpcRpcContainer setupContainer() { final GrpcRpcContainer container = new GrpcRpcContainer(); container.register(GrpcRpcProtocol.METADATA, empty -> { return async.resolved(metadataProvider.getMetadata()); }); container.register(GrpcRpcProtocol.PING, empty -> async.resolved(EMPTY)); container.register(GrpcRpcProtocol.METRICS_FULL_QUERY, g -> g.apply(metrics, MetricBackendGroup::query)); container.register(GrpcRpcProtocol.METRICS_WRITE, g -> g.apply(metrics, MetricBackend::write)); container.register(GrpcRpcProtocol.METADATA_FIND_TAGS, g -> g.apply(metadata, MetadataBackend::findTags)); container.register(GrpcRpcProtocol.METADATA_FIND_KEYS, g -> g.apply(metadata, MetadataBackend::findKeys)); container.register(GrpcRpcProtocol.METADATA_FIND_SERIES, g -> g.apply(metadata, MetadataBackend::findSeries)); container.register(GrpcRpcProtocol.METADATA_COUNT_SERIES, g -> g.apply(metadata, MetadataBackend::countSeries)); container.register(GrpcRpcProtocol.METADATA_WRITE, g -> g.apply(metadata, MetadataBackend::write)); container.register(GrpcRpcProtocol.METADATA_DELETE_SERIES, g -> g.apply(metadata, MetadataBackend::deleteSeries)); container.register(GrpcRpcProtocol.SUGGEST_TAG_KEY_COUNT, g -> g.apply(suggest, SuggestBackend::tagKeyCount)); container.register(GrpcRpcProtocol.SUGGEST_TAG, g -> g.apply(suggest, SuggestBackend::tagSuggest)); container.register(GrpcRpcProtocol.SUGGEST_KEY, g -> g.apply(suggest, SuggestBackend::keySuggest)); container.register(GrpcRpcProtocol.SUGGEST_TAG_VALUES, g -> g.apply(suggest, SuggestBackend::tagValuesSuggest)); container.register(GrpcRpcProtocol.SUGGEST_TAG_VALUE, g -> g.apply(suggest, SuggestBackend::tagValueSuggest)); return container; }