org.openfeed.client.api.InstrumentCache Maven / Gradle / Ivy
The newest version!
package org.openfeed.client.api;
import org.openfeed.InstrumentDefinition;
import java.util.Collection;
public interface InstrumentCache {
void addInstrument(InstrumentDefinition definition);
InstrumentDefinition getInstrument(long marketId);
InstrumentDefinition getInstrumentBySeqId(int marketId);
String getSymbol(long marketId);
int getTotalNumberOfInstruments();
Collection getAllInstruments();
Integer[] getChannelIds();
Collection getInstrumentsByChannel(int channelId);
void dump();
String VENDOR_BARCHART = "Barchart";
static String getDdfSymbol(InstrumentDefinition i) {
if (i.getSymbolsCount() > 0) {
for (InstrumentDefinition.Symbol s : i.getSymbolsList()) {
if (s.getVendor().equals(VENDOR_BARCHART)) {
return s.getSymbol();
}
}
}
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy