Last change
on this file since 13608 was 10600, checked in by Don-vip, 8 years ago |
see #11390 - sonar - squid:S1609 - Java 8: @FunctionalInterface annotation should be used to flag Single Abstract Method interfaces
|
-
Property svn:eol-style
set to
native
|
File size:
891 bytes
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.data.cache;
|
---|
3 |
|
---|
4 | /**
|
---|
5 | * Cache loader listener.
|
---|
6 | * @since 8168
|
---|
7 | * @since 10600 (functional interface)
|
---|
8 | */
|
---|
9 | @FunctionalInterface
|
---|
10 | public interface ICachedLoaderListener {
|
---|
11 |
|
---|
12 | /**
|
---|
13 | * Result of download
|
---|
14 | */
|
---|
15 | enum LoadResult {
|
---|
16 | SUCCESS,
|
---|
17 | FAILURE,
|
---|
18 | CANCELED
|
---|
19 | }
|
---|
20 |
|
---|
21 | /**
|
---|
22 | * Will be called when K object processed. The result might be:
|
---|
23 | * LoadResult.SUCCESS when object was fetched
|
---|
24 | * LoadResult.FAILURE when there was a failure during download
|
---|
25 | * LoadResult.REJECTED when job was rejected because of full queue
|
---|
26 | *
|
---|
27 | * @param data cache entry contents
|
---|
28 | * @param attributes cache entry attributes
|
---|
29 | * @param result load result (success, failure, canceled)
|
---|
30 | */
|
---|
31 | void loadingFinished(CacheEntry data, CacheEntryAttributes attributes, LoadResult result);
|
---|
32 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.