32 |
* should generally support. |
* should generally support. |
33 |
*/ |
*/ |
34 |
public interface IndexedPool extends StormPool { |
public interface IndexedPool extends StormPool { |
35 |
|
|
36 |
|
interface Index {} |
37 |
|
|
38 |
|
interface Indexer { |
39 |
|
void add(Block b); |
40 |
|
void remove(Block b); |
41 |
|
} |
42 |
|
|
43 |
|
interface IndexType { |
44 |
|
final class Result { |
45 |
|
Index index; |
46 |
|
Indexer indexer; |
47 |
|
|
48 |
|
public Result(Index index, Indexer indexer) { |
49 |
|
this.index = index; this.indexer = indexer; |
50 |
|
} |
51 |
|
} |
52 |
|
|
53 |
|
Result create(); |
54 |
|
} |
55 |
|
|
56 |
|
Index getIndex(IndexType type); |
57 |
|
|
58 |
/** Get a <code>Pointer</code> instance for a given pointer id. |
/** Get a <code>Pointer</code> instance for a given pointer id. |
59 |
* The <code>Pointer</code> instance provides information about the |
* The <code>Pointer</code> instance provides information about the |
60 |
* history of the given pointer inside this pool (what it currently |
* history of the given pointer inside this pool (what it currently |
64 |
* see <code>Pointer</code> javadoc. |
* see <code>Pointer</code> javadoc. |
65 |
* @see Pointer |
* @see Pointer |
66 |
*/ |
*/ |
67 |
Pointer getPointer(String id) throws IOException; |
//Pointer getPointer(String id) throws IOException; |
68 |
|
|
69 |
/** Get a set of <code>BlockId</code>s of diffs |
/** Get a set of <code>BlockId</code>s of diffs |
70 |
* which are diffs <em>from</em> the version identified |
* which are diffs <em>from</em> the version identified |
72 |
* diffs are recognized by the |
* diffs are recognized by the |
73 |
* <code>X-Gzz-Diff-From</code> header. |
* <code>X-Gzz-Diff-From</code> header. |
74 |
*/ |
*/ |
75 |
Set getDiffsFrom(BlockId id) throws IOException; |
//Set getDiffsFrom(BlockId id) throws IOException; |
76 |
|
|
77 |
/** Get a set of <code>BlockId</code>s of diffs |
/** Get a set of <code>BlockId</code>s of diffs |
78 |
* which are diffs <em>from</em> the version identified |
* which are diffs <em>from</em> the version identified |
80 |
* diffs are recognized by the |
* diffs are recognized by the |
81 |
* <code>X-Gzz-Diff-To</code> header. |
* <code>X-Gzz-Diff-To</code> header. |
82 |
*/ |
*/ |
83 |
Set getDiffsTo(BlockId id) throws IOException; |
//Set getDiffsTo(BlockId id) throws IOException; |
84 |
} |
} |