From c1d2649e7e62f1c9b7d2889e13addee6e649df90 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 25 Mar 2010 08:56:07 +0100 Subject: [PATCH] Add possibility to insert additional copies of certain blocks. --- src/main/java/net/pterodactylus/fcp/ClientPut.java | 20 ++++++++++++++++++++ .../net/pterodactylus/fcp/ClientPutComplexDir.java | 20 ++++++++++++++++++++ .../java/net/pterodactylus/fcp/ClientPutDiskDir.java | 20 ++++++++++++++++++++ 3 files changed, 60 insertions(+) diff --git a/src/main/java/net/pterodactylus/fcp/ClientPut.java b/src/main/java/net/pterodactylus/fcp/ClientPut.java index 809146a..5176e6a 100644 --- a/src/main/java/net/pterodactylus/fcp/ClientPut.java +++ b/src/main/java/net/pterodactylus/fcp/ClientPut.java @@ -140,6 +140,26 @@ public class ClientPut extends FcpMessage { } /** + * Sets the number of additional inserts of single blocks. + * + * @param extraInsertsSingleBlock + * The number of additional inserts + */ + public void setExtraInsertsSingleBlock(int extraInsertsSingleBlock) { + setField("ExtraInsertsSingleBlock", String.valueOf(extraInsertsSingleBlock)); + } + + /** + * Sets the number of additional inserts of splitfile header blocks. + * + * @param extraInsertsSplitfileHeaderBlock + * The number of additional inserts + */ + public void setExtraInsertsSplitfileHeaderBlock(int extraInsertsSplitfileHeaderBlock) { + setField("ExtraInsertsSplitfileHeaderBlock", String.valueOf(extraInsertsSplitfileHeaderBlock)); + } + + /** * Determines whether this request appears on the global queue. * * @param global diff --git a/src/main/java/net/pterodactylus/fcp/ClientPutComplexDir.java b/src/main/java/net/pterodactylus/fcp/ClientPutComplexDir.java index c370eaf..5b724c7 100644 --- a/src/main/java/net/pterodactylus/fcp/ClientPutComplexDir.java +++ b/src/main/java/net/pterodactylus/fcp/ClientPutComplexDir.java @@ -113,6 +113,26 @@ public class ClientPutComplexDir extends FcpMessage { } /** + * Sets the number of additional inserts of single blocks. + * + * @param extraInsertsSingleBlock + * The number of additional inserts + */ + public void setExtraInsertsSingleBlock(int extraInsertsSingleBlock) { + setField("ExtraInsertsSingleBlock", String.valueOf(extraInsertsSingleBlock)); + } + + /** + * Sets the number of additional inserts of splitfile header blocks. + * + * @param extraInsertsSplitfileHeaderBlock + * The number of additional inserts + */ + public void setExtraInsertsSplitfileHeaderBlock(int extraInsertsSplitfileHeaderBlock) { + setField("ExtraInsertsSplitfileHeaderBlock", String.valueOf(extraInsertsSplitfileHeaderBlock)); + } + + /** * Sets whether the request is on the global queue. * * @param global diff --git a/src/main/java/net/pterodactylus/fcp/ClientPutDiskDir.java b/src/main/java/net/pterodactylus/fcp/ClientPutDiskDir.java index c4e46c6..6c78e84 100644 --- a/src/main/java/net/pterodactylus/fcp/ClientPutDiskDir.java +++ b/src/main/java/net/pterodactylus/fcp/ClientPutDiskDir.java @@ -101,6 +101,26 @@ public class ClientPutDiskDir extends FcpMessage { } /** + * Sets the number of additional inserts of single blocks. + * + * @param extraInsertsSingleBlock + * The number of additional inserts + */ + public void setExtraInsertsSingleBlock(int extraInsertsSingleBlock) { + setField("ExtraInsertsSingleBlock", String.valueOf(extraInsertsSingleBlock)); + } + + /** + * Sets the number of additional inserts of splitfile header blocks. + * + * @param extraInsertsSplitfileHeaderBlock + * The number of additional inserts + */ + public void setExtraInsertsSplitfileHeaderBlock(int extraInsertsSplitfileHeaderBlock) { + setField("ExtraInsertsSplitfileHeaderBlock", String.valueOf(extraInsertsSplitfileHeaderBlock)); + } + + /** * Determines whether this request appears on the global queue. * * @param global -- 2.7.4