use of com.palantir.atlasdb.debug.LockDiagnosticInfo in project atlasdb by palantir.
the class LockDiagnosticCollector method logCurrentState.
void logCurrentState() {
LockDiagnosticInfo lockDiagnosticInfo = computeLockDiagnosticInfo(ImmutableMap.copyOf(cache.asMap()));
log.info("Got a request to log lock diagnostic information", UnsafeArg.of("info", lockDiagnosticInfo));
}
use of com.palantir.atlasdb.debug.LockDiagnosticInfo in project atlasdb by palantir.
the class LockDiagnosticCollector method getAndLogCurrentState.
LockDiagnosticInfo getAndLogCurrentState(Set<UUID> requestIds) {
Map<UUID, Optional<LockInfo>> cacheSnapshot = ImmutableMap.copyOf(cache.asMap());
Map<UUID, Optional<LockInfo>> viewForRequestIds = Maps.toMap(requestIds, requestId -> cacheSnapshot.getOrDefault(requestId, Optional.empty()));
LockDiagnosticInfo diagnosticInfo = computeLockDiagnosticInfo(viewForRequestIds);
log.info("Got a request to log lock diagnostic information", UnsafeArg.of("info", diagnosticInfo), SafeArg.of("requestIds", requestIds));
return diagnosticInfo;
}
Aggregations