MCPcopy Create free account
hub / github.com/OpenTSDB/asynchbase / call

Method call

src/Scanner.java:772–797  ·  view source on GitHub ↗
(final Object arg)

Source from the content-addressed store, hash-verified

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 }

Callers

nothing calls this directly

Calls 7

hexMethod · 0.95
scanFinishedMethod · 0.95
nextRowsMethod · 0.95
invalidateMethod · 0.95
keyMethod · 0.65
getMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected