[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/lava/gzz/storm IndexedPool.java Pointer.java
From: |
Benja Fallenstein |
Subject: |
[Gzz-commits] gzz/lava/gzz/storm IndexedPool.java Pointer.java |
Date: |
Mon, 30 Dec 2002 08:26:42 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Benja Fallenstein <address@hidden> 02/12/30 08:26:42
Modified files:
lava/gzz/storm : IndexedPool.java Pointer.java
Log message:
More thinking, getting close
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/lava/gzz/storm/IndexedPool.java.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/lava/gzz/storm/Pointer.java.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
Patches:
Index: gzz/lava/gzz/storm/IndexedPool.java
diff -u gzz/lava/gzz/storm/IndexedPool.java:1.7
gzz/lava/gzz/storm/IndexedPool.java:1.8
--- gzz/lava/gzz/storm/IndexedPool.java:1.7 Mon Dec 30 08:16:20 2002
+++ gzz/lava/gzz/storm/IndexedPool.java Mon Dec 30 08:26:42 2002
@@ -42,8 +42,11 @@
public interface IndexedPool extends StormPool {
final class Mapping {
+ public final Block block;
public final byte[] key, value;
- public Mapping(byte[] k, byte[] v) { key=k; value=v; }
+ public Mapping(Block b, byte[] k, byte[] v) {
+ block=b; key=k; value=v;
+ }
}
interface DB {
@@ -57,6 +60,11 @@
/**
* @return The set of <code>IndexedPool.Mapping</code>s
* this index wants to extract from this block.
+ * The <code>block</code> field of each
+ * returned <code>Mapping</code> must contain
+ * the block passed to this method; if this
+ * isn't satisfied, an exception will be thrown.
+ * (XXX specify which and where...)
*/
Set process(Block b);
@@ -70,8 +78,13 @@
* provide very different interfaces; therefore, we simply
* return an <code>Object</code> that has to be cast
* to the desired interface first.
+ * @param pool The <code>IndexedPool</code> this index
+ * will belong to.
+ * @param db A <code>IndexedPool.DB</code> object
+ * storing this index type's <code>Mapping</code>s--
+ * i.e., the back-end of the index.
*/
- Object createIndex(DB db);
+ Object createIndex(IndexedPool pool, DB db);
String getIndexTypeURI();
}
Index: gzz/lava/gzz/storm/Pointer.java
diff -u gzz/lava/gzz/storm/Pointer.java:1.4 gzz/lava/gzz/storm/Pointer.java:1.5
--- gzz/lava/gzz/storm/Pointer.java:1.4 Mon Dec 30 08:16:20 2002
+++ gzz/lava/gzz/storm/Pointer.java Mon Dec 30 08:26:42 2002
@@ -75,6 +75,11 @@
* it is much more convenient to call
<code>IndexedPool.getPointer()</code>.
*/
interface PointerIndex {
+ /**
+ * Mustn't return null even if there is no pointer block
+ * corresponding to this pointer yet (otherwise,
+ * we could not create new pointers in the first place).
+ */
Pointer getPointer(String uri);
}
}