@ThreadSafe public class ConversationStorageServiceImpl extends Object implements ConversationStorageService
Constructor and Description |
---|
ConversationStorageServiceImpl(ExpiryTicker expiryTicker) |
Modifier and Type | Method and Description |
---|---|
<T> Conversation<T> |
createConversation(T initialValue)
Creates a new conversation object for storing temporary data, initialized with the given value.
|
void |
deleteConversation(int conversationId)
Delete a conversation.
|
<T> Optional<Conversation<T>> |
getConversation(int conversationId,
Class<T> valueClass)
Returns an existing conversation object or
Optional.empty() if a conversation does not exist with the
provided id (e.g. |
public ConversationStorageServiceImpl(ExpiryTicker expiryTicker)
@NotNull public <T> Conversation<T> createConversation(@NotNull T initialValue)
ConversationStorageService
createConversation
in interface ConversationStorageService
@NotNull public <T> Optional<Conversation<T>> getConversation(int conversationId, @NotNull Class<T> valueClass)
ConversationStorageService
Optional.empty()
if a conversation does not exist with the
provided id (e.g. it has already expired).getConversation
in interface ConversationStorageService
valueClass
- class of the value stored in the conversationpublic void deleteConversation(int conversationId)
ConversationStorageService
deleteConversation
in interface ConversationStorageService
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.