/[gzz]/gzz/lava/gzz/storm/StormPool.java
ViewVC logotype

Diff of /gzz/lava/gzz/storm/StormPool.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by benja, Mon Dec 23 02:28:18 2002 UTC revision 1.11 by benja, Mon Dec 23 03:20:58 2002 UTC
# Line 39  public interface StormPool { Line 39  public interface StormPool {
39       *  detected until an InputStream retrieved from the Block       *  detected until an InputStream retrieved from the Block
40       *  is closed.       *  is closed.
41       *  <p>       *  <p>
42       *  If the block has to be requested from the network,       *  Note: If the block has to be requested from the network,
43       *  <code>null</code> is returned and a new thread is spawned       *  this method blocks until it has been loaded!
44       *  that performs the request. When the block becomes available,       *  For asynchronous loading, see <code>request()</code>.
      *  or it becomes known that it cannot be found on the network,  
      *  <code>listener.finished()</code> is called. When this method  
      *  is called again, it will either return a <code>Block</code>  
      *  or throw an exception. [XXX not yet]  
45       *  <p>       *  <p>
46       *  Calling <code>getPool()</code> on the returned block may return       *  Calling <code>getPool()</code> on the returned block may return
47       *  a different pool than this: If the block is retrieved from       *  a different pool than this: If the block is retrieved from
# Line 54  public interface StormPool { Line 50  public interface StormPool {
50       *  @throws FileNotFoundException if the block is not found       *  @throws FileNotFoundException if the block is not found
51       *                                in the pool.       *                                in the pool.
52       */       */
53      Block get(BlockId id/*, JobListener listener*/)      Block get(BlockId id)
54          throws FileNotFoundException, IOException;          throws FileNotFoundException, IOException;
55    
56        /** Load a block from the network, if it is not available locally.
57         *  If <code>listener</code> is given, it is informed when
58         *  the block has either been loaded, or the pool
59         *  has given up on loading it.
60         *  XXX
61         */
62        void request(BlockId id, BlockListener listener);
63    
64        /** Load a block from the network, if it is not available locally.
65         *  XXX
66         *  Equivalent to <code>request(id, null)</code>.
67         */
68        void request(BlockId id);
69    
70      /** Add a block to this pool.      /** Add a block to this pool.
71       *  The data in the block is checked by this class to assure       *  The data in the block is checked by this class to assure
72       *  that the block's id really matches the data in the block.       *  that the block's id really matches the data in the block.

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26