001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.data.cache; 003 004/** 005 * Cache loader listener. 006 * @since 8168 007 */ 008public interface ICachedLoaderListener { 009 010 /** 011 * Result of download 012 */ 013 enum LoadResult { 014 SUCCESS, 015 FAILURE, 016 CANCELED 017 } 018 019 /** 020 * Will be called when K object processed. The result might be: 021 * LoadResult.SUCCESS when object was fetched 022 * LoadResult.FAILURE when there was a failure during download 023 * LoadResult.REJECTED when job was rejected because of full queue 024 * 025 * @param data cache entry contents 026 * @param attributes cache entry attributes 027 * @param result load result (success, failure, canceled) 028 */ 029 void loadingFinished(CacheEntry data, CacheEntryAttributes attributes, LoadResult result); 030}