Author: toad
Date: 2006-08-09 00:00:02 +0000 (Wed, 09 Aug 2006)
New Revision: 9976
Modified:
trunk/freenet/src/freenet/node/fcp/ClientGet.java
trunk/freenet/src/freenet/node/fcp/ClientPut.java
trunk/freenet/src/freenet/node/fcp/ClientPutDir.java
trunk/freenet/src/freenet/node/fcp/PersistentGet.java
trunk/freenet/src/freenet/node/fcp/PersistentPut.java
trunk/freenet/src/freenet/node/fcp/PersistentPutDir.java
Log:
Add MaxRetries to Persistent* FCP messages.
Modified: trunk/freenet/src/freenet/node/fcp/ClientGet.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/ClientGet.java 2006-08-08 22:45:23 UTC
(rev 9975)
+++ trunk/freenet/src/freenet/node/fcp/ClientGet.java 2006-08-09 00:00:02 UTC
(rev 9976)
@@ -382,7 +382,7 @@
}
private FCPMessage persistentTagMessage() {
- return new PersistentGet(identifier, uri, verbosity,
priorityClass, returnType, persistenceType, targetFile, tempFile, clientToken,
client.isGlobalQueue, started);
+ return new PersistentGet(identifier, uri, verbosity,
priorityClass, returnType, persistenceType, targetFile, tempFile, clientToken,
client.isGlobalQueue, started, fctx.maxNonSplitfileRetries);
}
public void onFailure(FetchException e, ClientGetter state) {
Modified: trunk/freenet/src/freenet/node/fcp/ClientPut.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/ClientPut.java 2006-08-08 22:45:23 UTC
(rev 9975)
+++ trunk/freenet/src/freenet/node/fcp/ClientPut.java 2006-08-09 00:00:02 UTC
(rev 9976)
@@ -307,7 +307,7 @@
protected FCPMessage persistentTagMessage() {
return new PersistentPut(identifier, uri, verbosity,
priorityClass, uploadFrom, targetURI,
persistenceType, origFilename,
clientMetadata.getMIMEType(), client.isGlobalQueue,
- getDataSize(), clientToken, started);
+ getDataSize(), clientToken, started,
ctx.maxInsertRetries);
}
protected String getTypeName() {
Modified: trunk/freenet/src/freenet/node/fcp/ClientPutDir.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/ClientPutDir.java 2006-08-08
22:45:23 UTC (rev 9975)
+++ trunk/freenet/src/freenet/node/fcp/ClientPutDir.java 2006-08-09
00:00:02 UTC (rev 9976)
@@ -232,7 +232,7 @@
protected FCPMessage persistentTagMessage() {
return new PersistentPutDir(identifier, uri, verbosity,
priorityClass,
- persistenceType, global, defaultName,
manifestElements, clientToken, started);
+ persistenceType, global, defaultName,
manifestElements, clientToken, started, ctx.maxInsertRetries);
}
protected String getTypeName() {
Modified: trunk/freenet/src/freenet/node/fcp/PersistentGet.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/PersistentGet.java 2006-08-08
22:45:23 UTC (rev 9975)
+++ trunk/freenet/src/freenet/node/fcp/PersistentGet.java 2006-08-09
00:00:02 UTC (rev 9976)
@@ -26,10 +26,11 @@
final String clientToken;
final boolean global;
final boolean started;
+ final int maxRetries;
public PersistentGet(String identifier, FreenetURI uri, int verbosity,
short priorityClass, short returnType, short
persistenceType,
- File targetFile, File tempFile, String clientToken,
boolean global, boolean started) {
+ File targetFile, File tempFile, String clientToken,
boolean global, boolean started, int maxRetries) {
this.identifier = identifier;
this.uri = uri;
this.verbosity = verbosity;
@@ -41,24 +42,26 @@
this.clientToken = clientToken;
this.global = global;
this.started = started;
+ this.maxRetries = maxRetries;
}
public SimpleFieldSet getFieldSet() {
SimpleFieldSet fs = new SimpleFieldSet();
fs.put("Identifier", identifier);
fs.put("URI", uri.toString(false));
- fs.put("Verbosity", Integer.toString(verbosity));
+ fs.put("Verbosity", verbosity);
fs.put("ReturnType",
ClientGetMessage.returnTypeString(returnType));
fs.put("PersistenceType",
ClientRequest.persistenceTypeString(persistenceType));
if(returnType == ClientGetMessage.RETURN_TYPE_DISK) {
fs.put("Filename", targetFile.getAbsolutePath());
fs.put("TempFilename", tempFile.getAbsolutePath());
}
- fs.put("PriorityClass", Short.toString(priorityClass));
+ fs.put("PriorityClass", priorityClass);
if(clientToken != null)
fs.put("ClientToken", clientToken);
- fs.put("Global", Boolean.toString(global));
- fs.put("Started", Boolean.toString(started));
+ fs.put("Global", global);
+ fs.put("Started", started);
+ fs.put("MaxRetries", maxRetries);
return fs;
}
Modified: trunk/freenet/src/freenet/node/fcp/PersistentPut.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/PersistentPut.java 2006-08-08
22:45:23 UTC (rev 9975)
+++ trunk/freenet/src/freenet/node/fcp/PersistentPut.java 2006-08-09
00:00:02 UTC (rev 9976)
@@ -23,11 +23,12 @@
final long size;
final String token;
final boolean started;
+ final int maxRetries;
public PersistentPut(String identifier, FreenetURI uri, int verbosity,
short priorityClass, short uploadFrom, FreenetURI
targetURI,
short persistenceType, File origFilename, String
mimeType,
- boolean global, long size, String clientToken, boolean
started) {
+ boolean global, long size, String clientToken, boolean
started, int maxRetries) {
this.identifier = identifier;
this.uri = uri;
this.verbosity = verbosity;
@@ -41,6 +42,7 @@
this.size = size;
this.token = clientToken;
this.started = started;
+ this.maxRetries = maxRetries;
}
public SimpleFieldSet getFieldSet() {
@@ -57,12 +59,13 @@
fs.put("TargetURI", targetURI.toString());
if(mimeType != null)
fs.put("Metadata.ContentType", mimeType);
- fs.put("Global", Boolean.toString(global));
+ fs.put("Global", global);
if(size != -1)
fs.put("DataLength", size);
if(token != null)
fs.put("ClientToken", token);
fs.put("Started", started);
+ fs.put("MaxRetries", maxRetries);
return fs;
}
Modified: trunk/freenet/src/freenet/node/fcp/PersistentPutDir.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/PersistentPutDir.java 2006-08-08
22:45:23 UTC (rev 9975)
+++ trunk/freenet/src/freenet/node/fcp/PersistentPutDir.java 2006-08-09
00:00:02 UTC (rev 9976)
@@ -25,10 +25,11 @@
final String defaultName;
final String token;
final boolean started;
+ final int maxRetries;
public PersistentPutDir(String identifier, FreenetURI uri, int
verbosity,
short priorityClass, short persistenceType, boolean
global,
- String defaultName, HashMap manifestElements, String
token, boolean started) {
+ String defaultName, HashMap manifestElements, String
token, boolean started, int maxRetries) {
this.identifier = identifier;
this.uri = uri;
this.verbosity = verbosity;
@@ -39,6 +40,7 @@
this.manifestElements = manifestElements;
this.token = token;
this.started = started;
+ this.maxRetries = maxRetries;
}
public SimpleFieldSet getFieldSet() {
@@ -87,6 +89,7 @@
if(token != null)
fs.put("ClientToken", token);
fs.put("Started", Boolean.toString(started));
+ fs.put("MaxRetries", maxRetries);
return fs;
}