if (map == null) return null;
Integer version = SessionMapEntry.VERSION.get(map);
Long timestamp = SessionMapEntry.TIMESTAMP.get(map);
DistributableSessionMetadata metadata = SessionMapEntry.METADATA.get(map);
IncomingDistributableSessionDataImpl result = new IncomingDistributableSessionDataImpl(version, timestamp, metadata);
if (includeAttributes) {
try {
result.setSessionAttributes(DistributedCacheManager.this.attributeStorage.load(map));
} catch (Exception e) {
throw getRuntimeException("Failed to load session attributes for session: " + mask(key.getSessionId()), e);
}
}