public ConversationContext GetConversation(IdAndTimestamp conversationId) { if (conversationId != null && _conversationContexts.ContainsKey(conversationId)) { return(_conversationContexts[conversationId]); } return(null); }
public string GetConversationOfTweet(IdAndTimestamp tweetId) { if (tweetId != null && _tweetToConversation.ContainsKey(tweetId)) { return(_tweetToConversation[tweetId]); } return(null); }
public ITweet GetRootTweetOfConversation(IdAndTimestamp conversationId) { if (conversationId != null && _converstionToRootTweet.ContainsKey(conversationId)) { return(_converstionToRootTweet[conversationId]); } return(null); }
public bool PutConversation(IdAndTimestamp conversationId, ConversationContext conversationContext) { if (conversationId != null && conversationContext != null) { _conversationContexts.AddOrUpdate(conversationId, conversationContext); return(true); } return(false); }
public bool PutConversationOfTweet(IdAndTimestamp tweetId, string conversationId) { if (tweetId != null && conversationId != null) { _tweetToConversation.AddOrUpdate(tweetId, conversationId); return(true); } return(false); }
public bool PutLatestTweetOfConversation(IdAndTimestamp conversationId, ITweet tweet) { if (conversationId != null && tweet != null) { _converstionToLatestTweet.AddOrUpdate(conversationId, tweet); if (!_converstionToRootTweet.ContainsKey(conversationId)) { _converstionToRootTweet.Add(conversationId, tweet); } return(true); } return(false); }