[freenet-cvs] r14593 - trunk/freenet/src/freenet/client

toad at freenetproject.org toad at freenetproject.org
Sat Aug 11 12:32:34 UTC 2007


Author: toad
Date: 2007-08-11 12:32:34 +0000 (Sat, 11 Aug 2007)
New Revision: 14593

Modified:
   trunk/freenet/src/freenet/client/ArchiveStoreContext.java
Log:
Put member variables at the top

Modified: trunk/freenet/src/freenet/client/ArchiveStoreContext.java
===================================================================
--- trunk/freenet/src/freenet/client/ArchiveStoreContext.java	2007-08-11 12:31:31 UTC (rev 14592)
+++ trunk/freenet/src/freenet/client/ArchiveStoreContext.java	2007-08-11 12:32:34 UTC (rev 14593)
@@ -26,6 +26,15 @@
 	private FreenetURI key;
 	private short archiveType;
 	private boolean forceRefetchArchive;
+	/** Archive size */
+	private long lastSize = -1;
+	/** Archive hash */
+	private byte[] lastHash;
+	/** Index of still-cached ArchiveStoreItems with this key.
+	 * Note that we never ever hold this and then take another lock! In particular
+	 * we must not take the ArchiveManager lock while holding this lock. It must be
+	 * the inner lock to avoid deadlocks. */
+	private final DoublyLinkedListImpl myItems;
 	
 	public ArchiveStoreContext(ArchiveManager manager, FreenetURI key, short archiveType, boolean forceRefetchArchive) {
 		this.manager = manager;
@@ -69,9 +78,6 @@
 		return null;
 	}
 
-	// Archive size
-	private long lastSize = -1;
-	
 	/** Returns the size of the archive last time we fetched it, or -1 */
 	long getLastSize() {
 		return lastSize;
@@ -82,10 +88,7 @@
 		lastSize = size;
 	}
 
-	// Archive hash
 	
-	private byte[] lastHash;
-	
 	/** Returns the hash of the archive last time we fetched it, or null */
 	public byte[] getLastHash() {
 		return lastHash;
@@ -95,12 +98,6 @@
 	public void setLastHash(byte[] realHash) {
 		lastHash = realHash;
 	}
-	
-	/** Index of still-cached ArchiveStoreItems with this key.
-	 * Note that we never ever hold this and then take another lock! In particular
-	 * we must not take the ArchiveManager lock while holding this lock. It must be
-	 * the inner lock to avoid deadlocks. */
-	private final DoublyLinkedListImpl myItems;
 
 	/**
 	 * Remove all ArchiveStoreItems with this key from the cache.




More information about the cvs mailing list