java.lang.Object | |
↳ | com.atlassian.bitbucket.avatar.DelegatingCacheableAvatarSupplier |
An CacheableAvatarSupplier
implementation which delegates to an AvatarSupplier
, storing the avatar's
modification timestamp
separately. This class can be used to promote an ordinary
AvatarSupplier
to a CacheableAvatarSupplier
.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.atlassian.bitbucket.avatar.CacheableAvatarSupplier
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new
DelegatingCacheableAvatarSupplier with an unknown timestamp. | |||||||||||
Constructs a new
DelegatingCacheableAvatarSupplier with the provided timestamp . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
The content type of the avatar, e.g., "image/png"
| |||||||||||
The timestamp at which the avatar was last modified, in milliseconds.
| |||||||||||
Provides an
InputStream to read the avatar. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.atlassian.bitbucket.avatar.AvatarSupplier
| |||||||||||
From interface
com.atlassian.bitbucket.avatar.CacheableAvatarSupplier
| |||||||||||
From interface
com.atlassian.bitbucket.io.InputSupplier
|
Constructs a new DelegatingCacheableAvatarSupplier
with an unknown
timestamp.
supplier | the AvatarSupplier containing the avatar's content type and InputStream |
---|
Constructs a new DelegatingCacheableAvatarSupplier
with the provided timestamp
.
supplier | the AvatarSupplier containing the avatar's content type and InputStream |
---|---|
timestamp | the avatar's modification timestamp, which may be TIMESTAMP_UNKNOWN if no modification
timestamp is known, or TIMESTAMP_ETERNAL if the avatar is unmodifiable
|
The content type of the avatar, e.g., "image/png"
The timestamp at which the avatar was last modified, in milliseconds.
To account for differences in avatar repository implementations:
TIMESTAMP_UNKNOWN
.
Avatars without timestamps should not be cached, as it may not be possible to reliably detect updates.TIMESTAMP_ETERNAL
. Such
avatars may be cached more aggressively, as they cannot change.TIMESTAMP_UNKNOWN
if no
modification date is available, or TIMESTAMP_ETERNAL
if the avatar is unmodifiable
Provides an InputStream
to read the avatar. Each call to this method will produce a new stream.
IOException |
---|