MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / getCodec

Method getCodec

src/core/HistogramCodecManager.java:148–154  ·  view source on GitHub ↗

Return the instance of the given codec. @param id The numeric ID of the codec (the first byte in storage). @return The instance of the given codec @throws IllegalArgumentException if no codec was found for the given ID.

(final int id)

Source from the content-addressed store, hash-verified

146 * @throws IllegalArgumentException if no codec was found for the given ID.
147 */
148 public HistogramDataPointCodec getCodec(final int id) {
149 final HistogramDataPointCodec codec = codecs.get(id);
150 if (codec == null) {
151 throw new IllegalArgumentException("No codec found mapped to ID " + id);
152 }
153 return codec;
154 }
155
156 /**
157 * Return the ID of the given codec.

Callers 12

ctorMethod · 0.95
getDecoderMethod · 0.95
getDecoderClassMethod · 0.95
encodeMethod · 0.95
decodeMethod · 0.95
toSimpleHistogramMethod · 0.80
importDataPointMethod · 0.80
parseTelnetMethod · 0.80

Calls 1

getMethod · 0.45

Tested by 5

ctorMethod · 0.76
getDecoderMethod · 0.76
getDecoderClassMethod · 0.76