Skip to content
Snippets Groups Projects
Commit cababf61 authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- added new plugin param "BUFF_SIZE" to not infer with "BLOCK_SIZE" of 8192...

- added new plugin param "BUFF_SIZE" to not infer with "BLOCK_SIZE" of 8192 requested by ExL SC07081803
parent ed8a3304
No related branches found
No related tags found
No related merge requests found
Pipeline #6183 passed
......@@ -26,6 +26,19 @@
<label>ui.storage.nfs.fileBlockSize</label>
<ui_tool_tip>BlockSize in Bytes</ui_tool_tip>
<single>false</single>
<default_value>8192</default_value>
<mandatory>true</mandatory>
<validator_class_name>com.exlibris.core.infra.web.utils.formBuilder.validator.NumericFormValidator</validator_class_name>
<x_logic_type>String</x_logic_type>
<x_ui_type>TextField</x_ui_type>
<css_class>width40</css_class>
<x_options></x_options>
</x_field>
<x_field>
<field_name>BUFF_SIZE</field_name>
<label>ui.storage.nfs.fileBufferSize</label>
<ui_tool_tip>BufferSize in Bytes</ui_tool_tip>
<single>false</single>
<default_value>1048576</default_value>
<mandatory>true</mandatory>
<validator_class_name>com.exlibris.core.infra.web.utils.formBuilder.validator.NumericFormValidator</validator_class_name>
......@@ -70,7 +83,7 @@
</fr:x_form>
</pl:initParameters>
<pl:description>SLUB Storage Plugin</pl:description>
<pl:version>2.95</pl:version>
<pl:version>2.96</pl:version>
<pl:materialType>DIGITAL</pl:materialType>
<pl:module>Repository</pl:module>
<pl:generalType>TASK</pl:generalType>
......
......@@ -113,20 +113,20 @@ public class SLUBStoragePlugin extends AbstractStorageHandler {
private int getBlockSize () {
if (0 == this.blocksize) {
String blocksizeStr = this.parameters.get("BLOCK_SIZE");
String blocksizeStr = this.parameters.get("BUFF_SIZE");
if (null != blocksizeStr) {
try {
this.blocksize = Integer.parseInt(blocksizeStr);
log.info("Set blocksize to " + this.blocksize);
} catch (NumberFormatException e) {
log.error("Could not convert BLOCK_SIZE string to int, " + e.getMessage());
log.error("Could not convert BUFF_SIZE string to int, " + e.getMessage());
}
if (this.blocksize <= 0) {
log.error("BLOCK_SIZE needs to be greater than 0!");
log.error("BUFF_SIZE needs to be greater than 0!");
}
} else {
this.blocksize = 1024*1024;
log.info("Could not retrieve BLOCK_SIZE, using default of " + this.blocksize + " Bytes") ;
log.info("Could not retrieve BUFF_SIZE, using default of " + this.blocksize + " Bytes") ;
}
}
return this.blocksize;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment