private static <T> T getAttributeValue(final LoadBalancer.Subchannel subchannel,
                                           final Attributes.Key<Ref<T>> key,
                                           final T defaultValue) {
        final Ref<T> ref = subchannel.getAttributes().get(key);
        return Objects.isNull(ref) ? defaultValue : ref.value;
    }
SetStateInfo.

@param subchannel subchannel
@param value      value
shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-grpc/src/main/java/org/apache/shenyu/plugin/grpc/loadbalance/SubChannels.java