public ApplyResult apply()

in src/main/java/org/apache/skywalking/banyandb/v1/client/metadata/PropertyStore.java [44:61]


    public ApplyResult apply(Property payload, Strategy strategy) throws BanyanDBException {
        BanyandbProperty.ApplyRequest.Strategy s = BanyandbProperty.ApplyRequest.Strategy.STRATEGY_MERGE;
        switch (strategy) {
            case MERGE:
                s = BanyandbProperty.ApplyRequest.Strategy.STRATEGY_MERGE;
                break;
            case REPLACE:
                s = BanyandbProperty.ApplyRequest.Strategy.STRATEGY_REPLACE;
                break;
        }
        BanyandbProperty.ApplyRequest r = BanyandbProperty.ApplyRequest.newBuilder()
                .setProperty(payload.serialize())
                .setStrategy(s)
                .build();
        BanyandbProperty.ApplyResponse resp = HandleExceptionsWith.callAndTranslateApiException(() ->
                this.stub.apply(r));
        return new AutoValue_PropertyStore_ApplyResult(resp.getCreated(), resp.getTagsNum());
    }