Skip to content

Commit f948727

Browse files
committed
Fix bean in 'srmmanager.xml'.
Signed-off-by: Lukas Mansour <[email protected]>
1 parent 2a873d0 commit f948727

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

modules/dcache/src/main/java/diskCacheV111/doors/NettyLineBasedDoorFactory.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ protected void doStart() {
138138

139139
CellStub spaceManager = new CellStub(parentEndpoint, spaceManagerPath, 30_000);
140140
spaceDescriptionCache = ReservationCaches.buildOwnerDescriptionLookupCache(spaceManager,
141-
executor).synchronous();
142-
spaceLookupCache = ReservationCaches.buildSpaceLookupCache(spaceManager, executor).synchronous();
141+
executor);
142+
spaceLookupCache = ReservationCaches.buildSpaceLookupCache(spaceManager, executor);
143143

144144
LoginStrategy loginStrategy = new RemoteLoginStrategy(
145145
new CellStub(parentEndpoint, gPlazma, 30_000));

modules/dcache/src/main/java/org/dcache/space/ReservationCaches.java

+7-6
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
7272
import com.github.benmanes.caffeine.cache.AsyncCacheLoader;
7373
import com.github.benmanes.caffeine.cache.AsyncLoadingCache;
7474
import com.github.benmanes.caffeine.cache.Caffeine;
75+
import com.github.benmanes.caffeine.cache.LoadingCache;
7576
import diskCacheV111.services.space.Space;
7677
import diskCacheV111.services.space.message.GetSpaceMetaData;
7778
import diskCacheV111.services.space.message.GetSpaceTokens;
@@ -150,11 +151,11 @@ private ReservationCaches() {
150151
/**
151152
* Builds a loading cache for looking up space tokens by owner and description.
152153
*/
153-
public static AsyncLoadingCache<GetSpaceTokensKey, long[]> buildOwnerDescriptionLookupCache(
154+
public static LoadingCache<GetSpaceTokensKey, long[]> buildOwnerDescriptionLookupCache(
154155
CellStub spaceManager, Executor executor) {
155156
return Caffeine.newBuilder().maximumSize(1000).expireAfterWrite(30, SECONDS)
156157
.refreshAfterWrite(10, SECONDS).recordStats().executor(executor)
157-
.buildAsync(new AsyncCacheLoader<>() {
158+
.buildAsync(new AsyncCacheLoader<GetSpaceTokensKey, long[]>() {
158159
private GetSpaceTokens createRequest(GetSpaceTokensKey key) {
159160
GetSpaceTokens message = new GetSpaceTokens(key.description);
160161
message.setSubject(new Subject(true, key.principals, Collections.emptySet(),
@@ -203,13 +204,13 @@ public void failure(int rc, Object error) {
203204
}, executor);
204205
return future;
205206
}
206-
});
207+
}).synchronous();
207208
}
208209

209210
/**
210211
* Build a loading cache for looking up space reservations by space token.
211212
*/
212-
public static AsyncLoadingCache<String, Optional<Space>> buildSpaceLookupCache(
213+
public static LoadingCache<String, Optional<Space>> buildSpaceLookupCache(
213214
CellStub spaceManager,
214215
Executor executor) {
215216
return Caffeine.newBuilder()
@@ -218,7 +219,7 @@ public static AsyncLoadingCache<String, Optional<Space>> buildSpaceLookupCache(
218219
.refreshAfterWrite(30, SECONDS)
219220
.recordStats()
220221
.executor(executor)
221-
.buildAsync(new AsyncCacheLoader<>() {
222+
.buildAsync(new AsyncCacheLoader<String, Optional<Space>>() {
222223
@Override
223224
public CompletableFuture<Optional<Space>> asyncLoad(String token,
224225
Executor executor)
@@ -253,7 +254,7 @@ public void failure(int rc, Object error) {
253254
}, executor);
254255
return future;
255256
}
256-
});
257+
}).synchronous();
257258
}
258259

259260
/**

0 commit comments

Comments
 (0)