MCPcopy
hub / github.com/OpenTSDB/opentsdb / call

Method call

src/meta/Annotation.java:176–193  ·  view source on GitHub ↗
(final Annotation stored_note)

Source from the content-addressed store, hash-verified

174 final class StoreCB implements Callback<Deferred<Boolean>, Annotation> {
175
176 @Override
177 public Deferred<Boolean> call(final Annotation stored_note)
178 throws Exception {
179 final byte[] original_note = stored_note == null ? new byte[0] :
180 stored_note.getStorageJSON();
181
182 if (stored_note != null) {
183 Annotation.this.syncNote(stored_note, overwrite);
184 }
185
186 final byte[] tsuid_byte = tsuid != null && !tsuid.isEmpty() ?
187 UniqueId.stringToUid(tsuid) : null;
188 final PutRequest put = RequestBuilder.buildPutRequest(tsdb.getConfig(), tsdb.dataTable(),
189 getRowKey(start_time, tsuid_byte), FAMILY,
190 getQualifier(start_time),
191 Annotation.this.getStorageJSON(), start_time);
192 return tsdb.getClient().compareAndSet(put, original_note);
193 }
194
195 }
196

Callers

nothing calls this directly

Calls 10

stringToUidMethod · 0.95
buildPutRequestMethod · 0.95
syncNoteMethod · 0.80
isEmptyMethod · 0.80
dataTableMethod · 0.80
getStorageJSONMethod · 0.45
getConfigMethod · 0.45
getRowKeyMethod · 0.45
getQualifierMethod · 0.45
getClientMethod · 0.45

Tested by

no test coverage detected