@ThreadSafe public class ConversationStorageServiceImpl extends Object implements ConversationStorageService
Constructor and Description |
---|
ConversationStorageServiceImpl(ExpiryTicker expiryTicker) |
Modifier and Type | Method and Description |
---|---|
<T> @NotNull 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> @NotNull Optional<Conversation<T>> |
getConversation(int conversationId,
@NotNull 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> @NotNull Conversation<T> createConversation(@NotNull T initialValue)
ConversationStorageService
createConversation
in interface ConversationStorageService
@NotNull public <T> @NotNull Optional<Conversation<T>> getConversation(int conversationId, @NotNull @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 © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.