Author: toad
Date: 2008-12-24 19:45:26 +0000 (Wed, 24 Dec 2008)
New Revision: 24787
Modified:
branches/db4o/freenet/src/freenet/client/ArchiveExtractCallback.java
branches/db4o/freenet/src/freenet/client/ArchiveHandler.java
branches/db4o/freenet/src/freenet/support/api/Bucket.java
Log:
Comments
Modified: branches/db4o/freenet/src/freenet/client/ArchiveExtractCallback.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/ArchiveExtractCallback.java
2008-12-24 19:44:41 UTC (rev 24786)
+++ branches/db4o/freenet/src/freenet/client/ArchiveExtractCallback.java
2008-12-24 19:45:26 UTC (rev 24787)
@@ -9,7 +9,8 @@
* or isn't in it. */
public interface ArchiveExtractCallback {
- /** Got the data */
+ /** Got the data.
+ * Note that the bucket will be persistent if the caller asked for an
off-thread extraction. */
public void gotBucket(Bucket data, ObjectContainer container,
ClientContext context);
/** Not in the archive */
Modified: branches/db4o/freenet/src/freenet/client/ArchiveHandler.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/ArchiveHandler.java
2008-12-24 19:44:41 UTC (rev 24786)
+++ branches/db4o/freenet/src/freenet/client/ArchiveHandler.java
2008-12-24 19:45:26 UTC (rev 24787)
@@ -22,6 +22,8 @@
/**
* Get the metadata for this ZIP manifest, as a Bucket.
+ * THE RETURNED BUCKET WILL ALWAYS BE NON-PERSISTENT.
+ * @return The metadata as a Bucket, or null.
* @param manager The ArchiveManager.
* @throws FetchException If the container could not be fetched.
* @throws MetadataParseException If there was an error parsing
intermediary metadata.
@@ -34,8 +36,8 @@
/**
* Get a file from this ZIP manifest, as a Bucket.
- * If possible, read it from cache. If necessary, refetch the
- * container and extract it. If that fails, throw.
+ * If possible, read it from cache. If not, return null.
+ * THE RETURNED BUCKET WILL ALWAYS BE NON-PERSISTENT.
* @param inSplitZipManifest If true, indicates that the key points to
a splitfile zip manifest,
* which means that we need to pass a flag to the fetcher to tell it to
pretend it was a straight
* splitfile.
Modified: branches/db4o/freenet/src/freenet/support/api/Bucket.java
===================================================================
--- branches/db4o/freenet/src/freenet/support/api/Bucket.java 2008-12-24
19:44:41 UTC (rev 24786)
+++ branches/db4o/freenet/src/freenet/support/api/Bucket.java 2008-12-24
19:45:26 UTC (rev 24787)
@@ -60,6 +60,8 @@
/**
* Remove the bucket and everything under it from the database.
+ * You don't need to call this if it hasn't been storeTo()'ed: buckets
that use the database internally
+ * will run a blocking job to delete internal structure in free().
* @param container The database.
*/
public void removeFrom(ObjectContainer container);
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs