From c0f40ceb474ee93ed4e5b925f95b4ca9799516b4 Mon Sep 17 00:00:00 2001 From: John Cortell Date: Thu, 28 Oct 2010 15:50:33 +0000 Subject: [PATCH] Documentation --- .../eclipse/cdt/dsf/concurrent/RangeCache.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/RangeCache.java b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/RangeCache.java index 4258f6137f2..9f8863c3da8 100644 --- a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/RangeCache.java +++ b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/RangeCache.java @@ -23,10 +23,22 @@ import org.eclipse.core.runtime.MultiStatus; import org.eclipse.core.runtime.Status; /** - * Cache for retrieving ranges of elements from an asynchronous data source. + * Cache for efficiently retrieving overlapping ranges of elements from an + * asynchronous data source. The results of a range request (see + * {@link #getRange(long, int)}) are kept around and reused in subsequent + * requests. E.g., two individual, initial requests for 4 bytes at offsets 0 and + * 4 will relieve a subsequent request for 4 bytes at offset 2 from having to + * asynchronously retrieve the data from the source. The results from the first + * two range requests are used to service the third. + * + *

* Clients of this cache should call {@link #getRange(long, int)} to get a cache - * for that given range of elements. Sub-classes must implement {@link #retrieve(long, int, DataRequestMonitor)} - * to retrieve data from the asynchronous data source. + * for that given range of elements. Sub-classes must implement + * {@link #retrieve(long, int, DataRequestMonitor)} to retrieve data from the + * asynchronous data source. + * + * + * * @since 2.2 */ abstract public class RangeCache {