summaryrefslogtreecommitdiff
path: root/src/PeerStorage.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-07-03 05:26:41 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-07-03 05:26:41 +0900
commit4df7b540a2263b87577a8805b3ca08e5e3e4da65 (patch)
tree17336c68a4aebdd4305fc546f0274180bc98d088 /src/PeerStorage.h
parentf7cbbfd209d8df2dec21da907e48bb09c5429484 (diff)
Fix warning "Cannot fid peer ... in usedPeers_"
Diffstat (limited to 'src/PeerStorage.h')
-rw-r--r--src/PeerStorage.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/PeerStorage.h b/src/PeerStorage.h
index 08132b06..78a0944f 100644
--- a/src/PeerStorage.h
+++ b/src/PeerStorage.h
@@ -68,6 +68,12 @@ public:
virtual void addPeer(const std::vector<std::shared_ptr<Peer>>& peers) = 0;
/**
+ * Adds new peer, and checkout it atomically.
+ */
+ virtual std::shared_ptr<Peer>
+ addAndCheckoutPeer(const std::shared_ptr<Peer>& peer, cuid_t cuid) = 0;
+
+ /**
* Returns the number of peers, including used and unused ones.
*/
virtual size_t countAllPeer() const = 0;