use of com.hazelcast.internal.util.collection.Long2ObjectHashMap in project hazelcast by hazelcast.
the class AbstractBlockingService method onSessionClose.
@Override
public final void onSessionClose(CPGroupId groupId, long sessionId) {
ResourceRegistry<W, R> registry = registries.get(groupId);
if (registry == null) {
if (logger.isFineEnabled()) {
logger.fine("Resource registry of " + groupId + " not found to handle closed Session[" + sessionId + "]");
}
return;
}
List<Long> expiredWaitKeys = new ArrayList<>();
Long2ObjectHashMap<Object> completedWaitKeys = new Long2ObjectHashMap<>();
registry.closeSession(sessionId, expiredWaitKeys, completedWaitKeys);
if (logger.isFineEnabled() && (expiredWaitKeys.size() > 0 || completedWaitKeys.size() > 0)) {
logger.fine("Closed Session[" + sessionId + "] in " + groupId + " expired wait key commit indices: " + expiredWaitKeys + " completed wait keys: " + completedWaitKeys);
}
completeFutures(groupId, expiredWaitKeys, new SessionExpiredException());
raftService.completeFutures(groupId, completedWaitKeys.entrySet());
}
Aggregations