(final Annotation stored_note)
| 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 |
nothing calls this directly
no test coverage detected