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.voiddeleteConversation(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. it has already expired).
-
-
-
Constructor Detail
-
ConversationStorageServiceImpl
public ConversationStorageServiceImpl(ExpiryTicker expiryTicker)
-
-
Method Detail
-
createConversation
@NotNull public <T> @NotNull Conversation<T> createConversation(@NotNull T initialValue)
Description copied from interface:ConversationStorageServiceCreates a new conversation object for storing temporary data, initialized with the given value.- Specified by:
createConversationin interfaceConversationStorageService
-
getConversation
@NotNull public <T> @NotNull Optional<Conversation<T>> getConversation(int conversationId, @NotNull @NotNull Class<T> valueClass)
Description copied from interface:ConversationStorageServiceReturns an existing conversation object orOptional.empty()if a conversation does not exist with the provided id (e.g. it has already expired).- Specified by:
getConversationin interfaceConversationStorageServicevalueClass- class of the value stored in the conversation
-
deleteConversation
public void deleteConversation(int conversationId)
Description copied from interface:ConversationStorageServiceDelete a conversation. Will do nothing if a conversation with given id does not exist.- Specified by:
deleteConversationin interfaceConversationStorageService
-
-