(final byte[] incoming_tsuid)
| 173 | |
| 174 | class TSUIDCB implements Callback<Deferred<IncomingDataPoint>, byte[]> { |
| 175 | @Override |
| 176 | public Deferred<IncomingDataPoint> call(final byte[] incoming_tsuid) |
| 177 | throws Exception { |
| 178 | if (tsuid == null && incoming_tsuid == null) { |
| 179 | return Deferred.fromError(new RuntimeException("Both incoming and " |
| 180 | + "supplied TSUIDs were null for " + TSUIDQuery.this)); |
| 181 | } else if (incoming_tsuid != null) { |
| 182 | setTSUID(incoming_tsuid); |
| 183 | } |
| 184 | if (back_scan < 1 && meta_enabled) { |
| 185 | final GetRequest get = new GetRequest(tsdb.metaTable(), tsuid); |
| 186 | get.family(TSMeta.FAMILY()); |
| 187 | get.qualifier(TSMeta.COUNTER_QUALIFIER()); |
| 188 | return tsdb.getClient().get(get).addCallbackDeferring(new MetaCB()); |
| 189 | } |
| 190 | |
| 191 | if (last_timestamp > 0) { |
| 192 | last_timestamp = Internal.baseTime(last_timestamp); |
| 193 | } else { |
| 194 | last_timestamp = Internal.baseTime(DateTime.currentTimeMillis()); |
| 195 | } |
| 196 | final byte[] key = RowKey.rowKeyFromTSUID(tsdb, tsuid, last_timestamp); |
| 197 | final GetRequest get = new GetRequest(tsdb.dataTable(), key); |
| 198 | get.family(TSDB.FAMILY()); |
| 199 | return tsdb.getClient().get(get).addCallbackDeferring(new LastPointCB()); |
| 200 | } |
| 201 | @Override |
| 202 | public String toString() { |
| 203 | return "TSUID callback"; |
nothing calls this directly
no test coverage detected