/** * Forces a refresh of the value. This method will not attempt to lock on calls to refresh the * value. * * @throws AmazonClientException If error occurs during refresh. * @throws IllegalStateException If value if invalid after refreshing. */ public T forceGetValue() { refreshValue(); return getRefreshedValue(); }
/** * Return a valid value, refreshing if necessary. May return the current value, do an async * refresh if possible, or do a blocking refresh if needed. * * @throws AmazonClientException If error occurs during refresh. * @throws IllegalStateException If value if invalid after refreshing. */ public T getValue() throws AmazonClientException, IllegalStateException { if (shouldDoBlockingRefresh()) { blockingRefresh(); } else if (shouldDoAsyncRefresh()) { asyncRefresh(); } return getRefreshedValue(); }
/** * Forces a refresh of the value. This method will not attempt to lock on calls to refresh the * value. * * @throws AmazonClientException If error occurs during refresh. * @throws IllegalStateException If value if invalid after refreshing. */ public T forceGetValue() { refreshValue(); return getRefreshedValue(); }
/** * Return a valid value, refreshing if necessary. May return the current value, do an async * refresh if possible, or do a blocking refresh if needed. * * @throws AmazonClientException If error occurs during refresh. * @throws IllegalStateException If value if invalid after refreshing. */ public T getValue() throws AmazonClientException, IllegalStateException { if (shouldDoBlockingRefresh()) { blockingRefresh(); } else if (shouldDoAsyncRefresh()) { asyncRefresh(); } return getRefreshedValue(); }