@ParametersAreNonnullByDefault public class DualAttachmentGetStrategy extends Object implements AttachmentGetStrategy
AttachmentGetStrategy
which get
two stores and will try to first load attachment from primary store, in case of absence will try to get from
secondary store. When Attachment will be found in primaryStore a background task will be started which will load
attachment from secondary store and transfer content to NullOutputStream to generate a real load on secondary store.Constructor and Description |
---|
DualAttachmentGetStrategy(StreamAttachmentStore primaryStore,
StreamAttachmentStore secondaryStore) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
com.atlassian.util.concurrent.Promise<Boolean> |
exists(AttachmentKey attachmentKey) |
<A> com.atlassian.util.concurrent.Promise<A> |
getAttachmentData(AttachmentKey attachmentKey,
com.atlassian.util.concurrent.Function<AttachmentGetData,A> attachmentGetDataProcessor) |
int |
hashCode() |
public DualAttachmentGetStrategy(StreamAttachmentStore primaryStore, StreamAttachmentStore secondaryStore)
public <A> com.atlassian.util.concurrent.Promise<A> getAttachmentData(AttachmentKey attachmentKey, com.atlassian.util.concurrent.Function<AttachmentGetData,A> attachmentGetDataProcessor)
getAttachmentData
in interface AttachmentGetStrategy
public com.atlassian.util.concurrent.Promise<Boolean> exists(AttachmentKey attachmentKey)
exists
in interface AttachmentGetStrategy
Copyright © 2002-2016 Atlassian. All Rights Reserved.