Skip to content

Commit

Permalink
Fix use of volatile
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Di Tommaso <[email protected]>
  • Loading branch information
pditommaso committed Nov 26, 2024
1 parent 7475f66 commit c375659
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import io.seqera.wave.http.HttpClientFactory
import io.seqera.wave.util.RegHelper
import io.seqera.wave.util.Retryable
import io.seqera.wave.util.StringUtils
import jakarta.annotation.PostConstruct
import jakarta.inject.Inject
import jakarta.inject.Named
import jakarta.inject.Singleton
Expand Down Expand Up @@ -69,7 +70,7 @@ class RegistryAuthServiceImpl implements RegistryAuthService {

@Inject
@Named(TaskExecutors.BLOCKING)
private volatile ExecutorService ioExecutor
private ExecutorService ioExecutor

@Canonical
@ToString(includePackage = false, includeNames = true)
Expand Down Expand Up @@ -109,12 +110,14 @@ class RegistryAuthServiceImpl implements RegistryAuthService {

// FIXME https://github.com/seqeralabs/wave/issues/747
private AsyncLoadingCache<CacheKey, String> cacheTokens

@Inject
private RegistryLookupService lookupService

@Inject
private RegistryCredentialsFactory credentialsFactory

@PostConstruct
private void init() {
cacheTokens = Caffeine
.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class RegistryLookupServiceImpl implements RegistryLookupService {

@Inject
@Named(TaskExecutors.BLOCKING)
private volatile ExecutorService ioExecutor
private ExecutorService ioExecutor

private CacheLoader<URI, RegistryAuth> loader = new CacheLoader<URI, RegistryAuth>() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class AwsEcrService {

@Inject
@Named(TaskExecutors.BLOCKING)
private volatile ExecutorService ioExecutor
private ExecutorService ioExecutor

// FIXME https://github.com/seqeralabs/wave/issues/747
private AsyncLoadingCache<AwsCreds, String> cache
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class JobManager {

@Inject
@Named(TaskExecutors.BLOCKING)
private volatile ExecutorService ioExecutor
private ExecutorService ioExecutor

// FIXME https://github.com/seqeralabs/wave/issues/747
private AsyncCache<String,Instant> debounceCache
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class BuildLogServiceImpl implements BuildLogService {

@Inject
@Named(TaskExecutors.IO)
private volatile ExecutorService ioExecutor
private ExecutorService ioExecutor

@PostConstruct
private void init() {
Expand Down

0 comments on commit c375659

Please sign in to comment.