(final Object arg)
| 770 | opened_scanner = |
| 771 | new Callback<Deferred<ArrayList<ArrayList<KeyValue>>>, Object>() { |
| 772 | public Deferred<ArrayList<ArrayList<KeyValue>>> call(final Object arg) { |
| 773 | final Response resp; |
| 774 | if (arg instanceof Long) { |
| 775 | scanner_id = (Long) arg; |
| 776 | resp = null; |
| 777 | } else if (arg instanceof Response) { |
| 778 | resp = (Response) arg; |
| 779 | scanner_id = resp.scanner_id; |
| 780 | scannerClosedOnServer = resp.scannerClosedOnServer; |
| 781 | moreRows = resp.more; |
| 782 | } else { |
| 783 | throw new IllegalStateException("WTF? Scanner open callback" |
| 784 | + " invoked with impossible" |
| 785 | + " argument: " + arg); |
| 786 | } |
| 787 | if (LOG.isDebugEnabled()) { |
| 788 | LOG.debug("Scanner " + Bytes.hex(scanner_id) + " opened on " + region); |
| 789 | } |
| 790 | if (resp != null) { |
| 791 | if (resp.rows == null) { |
| 792 | return scanFinished(!resp.more); |
| 793 | } |
| 794 | return Deferred.fromResult(resp.rows); |
| 795 | } |
| 796 | return nextRows(); // Restart the call. |
| 797 | } |
| 798 | public String toString() { |
| 799 | return "scanner opened"; |
| 800 | } |
nothing calls this directly
no test coverage detected