All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyun.credentials.provider.RefreshResult Maven / Gradle / Ivy

Go to download

Alibaba Cloud Credentials for Java Copyright (C) Alibaba Cloud Computing All rights reserved. 版权所有 (C)阿里云计算有限公司 https://www.aliyun.com

There is a newer version: 0.3.12
Show newest version
package com.aliyun.credentials.provider;

public final class RefreshResult {
    private final T value;
    private final long staleTime;

    private RefreshResult(Builder builder) {
        this.value = builder.value;
        this.staleTime = builder.staleTime;
    }

    public static  Builder builder(T value) {
        return new Builder<>(value);
    }

    public T value() {
        return value;
    }

    public long staleTime() {
        return staleTime;
    }

    public static final class Builder {
        private final T value;
        private long staleTime;

        private Builder(T value) {
            this.value = value;
        }

        public Builder staleTime(long staleTime) {
            this.staleTime = staleTime;
            return this;
        }

        public RefreshResult build() {
            return new RefreshResult(this);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy