MCPcopy Create free account
hub / github.com/apple/foundationdb / toString

Method toString

fdbserver/VersionedBTree.actor.cpp:668–689  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

666 }
667
668 std::string toString() const {
669 if (mode == WRITE) {
670 return format("{WriteCursor %s:%p pos=%s:%d rawEndOffset=%d}",
671 queue->name.c_str(),
672 this,
673 ::toString(pageID).c_str(),
674 offset,
675 page ? header()->endOffset : -1);
676 }
677 if (mode == POP || mode == READONLY) {
678 return format("{ReadCursor %s:%p pos=%s:%d rawEndOffset=%d endPage=%s nextPage=%s}",
679 queue->name.c_str(),
680 this,
681 ::toString(pageID).c_str(),
682 offset,
683 (page && header()) ? header()->endOffset : -1,
684 ::toString(endPageID).c_str(),
685 ::toString(nextPageID).c_str());
686 }
687 ASSERT(mode == NONE);
688 return format("{NullCursor=%p}", this);
689 }
690
691 // Returns true if the mutex cannot be immediately taken.
692 bool isBusy() { return !mutex.available(); }

Callers 2

write_implMethod · 0.95
waitThenReadNextMethod · 0.95

Calls 4

headerClass · 0.85
toStringFunction · 0.70
formatFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected