throw new IllegalArgumentException("Unsupported Metadata Type " + m.metaType());
case INSTRUMENT:
instIDs.add((InstrumentID) m);
break;
case EXCHANGE:
final Exchange e = Exchanges.fromID((ExchangeID)m);
if(e.isNull()) {
log.warn("Attempted to include invalid exchange ID " + ((ExchangeID)m).id());
} else {
metas.add(e);
}
break;
}
}
final Map<InstrumentID, Instrument> iMap = metaService.instrument(
instIDs.toArray(new InstrumentID[0])).toBlockingObservable().single();
for(final Entry<InstrumentID, Instrument> e : iMap.entrySet()) {
if(!e.getValue().isNull()) {
metas.add(e.getValue());
}
}
include(metas.toArray(new Metadata[0]));
}