throw new IllegalStateException("JobID is not set in the request message");
}
ConcurrentMap<Object, PartialResult> map = sessionStore.get(groupID);
Object feature = msg.getFeature();
PartialResult partial = map.get(feature);
if(partial == null) {
final MixEventName event = msg.getEvent();
switch(event) {
case average:
partial = new PartialAverage(scale);
break;
case argminKLD:
partial = new PartialArgminKLD(scale);
break;
default:
throw new IllegalStateException("Unexpected event: " + event);
}
PartialResult existing = map.putIfAbsent(feature, partial);
if(existing != null) {
partial = existing;
}
}
return partial;