Class ConversationStorageServiceImpl
- java.lang.Object
-
- com.atlassian.bamboo.caching.conversation.ConversationStorageServiceImpl
-
- All Implemented Interfaces:
ConversationStorageService
@ThreadSafe public class ConversationStorageServiceImpl extends Object implements ConversationStorageService
-
-
Constructor Summary
Constructors Constructor Description ConversationStorageServiceImpl(ExpiryTicker expiryTicker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 orOptional.empty()
if a conversation does not exist with the provided id (e.g.
-
-
-
Constructor Detail
-
ConversationStorageServiceImpl
public ConversationStorageServiceImpl(ExpiryTicker expiryTicker)
-
-
Method Detail
-
createConversation
@NotNull public <T> @NotNull Conversation<T> createConversation(@NotNull T initialValue)
Description copied from interface:ConversationStorageService
Creates a new conversation object for storing temporary data, initialized with the given value.- Specified by:
createConversation
in interfaceConversationStorageService
-
getConversation
@NotNull public <T> @NotNull Optional<Conversation<T>> getConversation(int conversationId, @NotNull @NotNull Class<T> valueClass)
Description copied from interface:ConversationStorageService
Returns an existing conversation object orOptional.empty()
if a conversation does not exist with the provided id (e.g. it has already expired).- Specified by:
getConversation
in interfaceConversationStorageService
valueClass
- class of the value stored in the conversation
-
deleteConversation
public void deleteConversation(int conversationId)
Description copied from interface:ConversationStorageService
Delete a conversation. Will do nothing if a conversation with given id does not exist.- Specified by:
deleteConversation
in interfaceConversationStorageService
-
-