aboutsummaryrefslogtreecommitdiffstats
path: root/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/client/AthenzIdentityProviderImpl.java
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@oath.com>2018-06-13 13:22:00 +0200
committerBjørn Christian Seime <bjorncs@oath.com>2018-06-13 13:22:00 +0200
commit2f0bdfc44a77a7a4ceb9f9a18e9ac4935d101e42 (patch)
treec5ed904f2a452c63778b041f405918d5304c7d4d /vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/client/AthenzIdentityProviderImpl.java
parenteb80fb0d3a6004431ff13e36e9f480ccb32ec31f (diff)
Use pascal case for constants
Diffstat (limited to 'vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/client/AthenzIdentityProviderImpl.java')
-rw-r--r--vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/client/AthenzIdentityProviderImpl.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/client/AthenzIdentityProviderImpl.java b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/client/AthenzIdentityProviderImpl.java
index ce0743021ff..f994316c22d 100644
--- a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/client/AthenzIdentityProviderImpl.java
+++ b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/client/AthenzIdentityProviderImpl.java
@@ -47,6 +47,7 @@ public final class AthenzIdentityProviderImpl extends AbstractComponent implemen
// TODO These should match the requested expiration
static final Duration UPDATE_PERIOD = Duration.ofDays(1);
static final Duration AWAIT_TERMINTATION_TIMEOUT = Duration.ofSeconds(90);
+ private final static Duration ROLE_SSL_CONTEXT_EXPIRY = Duration.ofHours(24);
public static final String CERTIFICATE_EXPIRY_METRIC_NAME = "athenz-tenant-cert.expiry.seconds";
@@ -62,7 +63,6 @@ public final class AthenzIdentityProviderImpl extends AbstractComponent implemen
private final URI ztsEndpoint;
private final LoadingCache<AthenzRole, SSLContext> roleSslContextCache;
- private final static Duration roleSslContextExpiry = Duration.ofHours(24);
@Inject
public AthenzIdentityProviderImpl(IdentityConfig config, Metric metric) {
@@ -93,8 +93,8 @@ public final class AthenzIdentityProviderImpl extends AbstractComponent implemen
this.ztsEndpoint = URI.create(config.ztsUrl());
registerInstance();
roleSslContextCache = CacheBuilder.newBuilder()
- .refreshAfterWrite(roleSslContextExpiry.dividedBy(2).toMinutes(), TimeUnit.MINUTES)
- .expireAfterWrite(roleSslContextExpiry.toMinutes(), TimeUnit.MINUTES)
+ .refreshAfterWrite(ROLE_SSL_CONTEXT_EXPIRY.dividedBy(2).toMinutes(), TimeUnit.MINUTES)
+ .expireAfterWrite(ROLE_SSL_CONTEXT_EXPIRY.toMinutes(), TimeUnit.MINUTES)
.build(new CacheLoader<AthenzRole, SSLContext>() {
@Override
public SSLContext load(AthenzRole key) throws Exception {