@ThreadSafe public interface ConversationStorageService
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. |
@NotNull <T> Conversation<T> createConversation(@NotNull T initialValue)
@NotNull <T> Optional<Conversation<T>> getConversation(int conversationId, @NotNull Class<T> valueClass)
Optional.empty()
if a conversation does not exist with the
provided id (e.g. it has already expired).valueClass
- class of the value stored in the conversationIllegalStateException
- if the conversation exists but the type of the stored object is not exactly the
same as the given classvoid deleteConversation(int conversationId)
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.