/
Configuration.java
1207 lines (1000 loc) · 38.2 KB
/
Configuration.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
COPYRIGHT STATUS:
Dec 1st 2001, Fermi National Accelerator Laboratory (FNAL) documents and
software are sponsored by the U.S. Department of Energy under Contract No.
DE-AC02-76CH03000. Therefore, the U.S. Government retains a world-wide
non-exclusive, royalty-free license to publish or reproduce these documents
and software for U.S. Government purposes. All documents and software
available from this server are protected under the U.S. and Foreign
Copyright Laws, and FNAL reserves all rights.
Distribution of the software available from this server is free of
charge subject to the user following the terms of the Fermitools
Software Legal Information.
Redistribution and/or modification of the software shall be accompanied
by the Fermitools Software Legal Information (including the copyright
notice).
The user is asked to feed back problems, benefits, and/or suggestions
about the software to the Fermilab Software Providers.
Neither the name of Fermilab, the URA, nor the names of the contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
DISCLAIMER OF LIABILITY (BSD):
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FERMILAB,
OR THE URA, OR THE U.S. DEPARTMENT of ENERGY, OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Liabilities of the Government:
This software is provided by URA, independent from its Prime Contract
with the U.S. Department of Energy. URA is acting independently from
the Government and in its own private capacity and is not acting on
behalf of the U.S. Government, nor as its contractor nor its agent.
Correspondingly, it is understood and agreed that the U.S. Government
has no connection to this software and in no manner whatsoever shall
be liable for nor assume any responsibility or obligation for any claim,
cost, or damages arising out of or resulting from the use of the software
available from this server.
Export Control:
All documents and software available from this server are subject to U.S.
export control laws. Anyone downloading information from this server is
obligated to secure any necessary Government licenses before exporting
documents or software obtained from this server.
*/
package org.dcache.srm.util;
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableMap;
import org.italiangrid.voms.ac.VOMSACValidator;
import org.springframework.transaction.PlatformTransactionManager;
import javax.sql.DataSource;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import org.dcache.srm.SRMAuthorization;
import org.dcache.srm.SRMUserPersistenceManager;
import org.dcache.srm.client.Transport;
import static com.google.common.base.Preconditions.checkArgument;
public class Configuration {
private static final String INFINITY = "infinity";
public static final String LS_PARAMETERS = "ls";
public static final String PUT_PARAMETERS = "put";
public static final String GET_PARAMETERS = "get";
public static final String COPY_PARAMETERS = "copy";
public static final String BRINGONLINE_PARAMETERS = "bringonline";
public static final String RESERVE_PARAMETERS = "reserve";
protected boolean debug = false;
protected String urlcopy="../scripts/urlcopy.sh";
protected String gsiftpclinet = "globus-url-copy";
protected boolean gsissl = true;
protected int buffer_size=2048;
protected int tcp_buffer_size;
private int parallel_streams=10;
protected int port=8443;
protected long authzCacheLifetime = 180;
protected String srm_root="/";
protected String proxies_directory = "../proxies";
protected int timeout=60*60; //one hour
protected String timeout_script="../scripts/timeout.sh";
/**
* Host to use in the surl (srm url) of the
* local file, when giving the info (metadata) to srm clients
*/
private String srmHost;
/**
* A host part of the srm url (surl) is used to determine if the surl
* references file in this storage system.
* In case of the copy operation, srm needs to be able to tell the
* local surl from the remote one.
* Also SRM needs to refuse to perform operations on non local srm urls
* This collection cosists of hosts that are cosidered local by this srm server.
* This parameter has to be a collection because in case of the multihomed
* or distributed server it may have more than one network name.
*
*/
private final Set<String> localSrmHosts=new HashSet<>();
private SRMAuthorization authorization;
// scheduler parameters
protected long getMaxPollPeriod =60000;
private long getSwitchToAsynchronousModeDelay = 0;
protected long lsMaxPollPeriod =60000;
private long lsSwitchToAsynchronousModeDelay = 0;
protected long bringOnlineMaxPollPeriod =60000;
private long bringOnlineSwitchToAsynchronousModeDelay = 0;
protected long putMaxPollPeriod =60000;
private long putSwitchToAsynchronousModeDelay = 0;
protected long reserveSpaceMaxPollPeriod =60000;
protected long copyMaxPollPeriod =60000;
protected long getLifetime = 24*60*60*1000;
protected long bringOnlineLifetime = 24*60*60*1000;
protected long putLifetime = 24*60*60*1000;
protected long copyLifetime = 24*60*60*1000;
protected long reserveSpaceLifetime = 24*60*60*1000;
protected long defaultSpaceLifetime = 24*60*60*1000;
protected long maximumClientAssumedBandwidth = 0;
protected boolean useUrlcopyScript=false;
protected boolean useDcapForSrmCopy=false;
protected boolean useGsiftpForSrmCopy=true;
protected boolean useHttpForSrmCopy=true;
protected boolean useFtpForSrmCopy=true;
protected boolean recursiveDirectoryCreation=false;
protected boolean advisoryDelete=false;
protected long storage_info_update_period = TimeUnit.SECONDS.toMillis(30);
protected String qosPluginClass = null;
protected String qosConfigFile = null;
private Integer maxQueuedJdbcTasksNum ; //null by default
private Integer jdbcExecutionThreadNum;//null by default
private String credentialsDirectory="/opt/d-cache/credentials";
private boolean overwrite = false;
private boolean overwrite_by_default = false;
private int sizeOfSingleRemoveBatch = 100;
private SRMUserPersistenceManager srmUserPersistenceManager;
private int maxNumberOfLsEntries = 1000;
private int maxNumberOfLsLevels = 100;
private boolean clientDNSLookup=false;
private String counterRrdDirectory = null;
private String gaugeRrdDirectory = null;
protected String clientTransport = Transport.GSI.name();
private DataSource dataSource;
private PlatformTransactionManager transactionManager;
private final Map<String,DatabaseParameters> databaseParameters =
new HashMap<>();
private String caCertificatePath;
private String vomsdir;
private ImmutableMap<String,String> pingExtraInfo = ImmutableMap.of();
private String[] versions;
private VOMSACValidator vomsValidator;
/** Creates a new instance of Configuration */
public Configuration() {
databaseParameters.put(PUT_PARAMETERS, new DatabaseParameters("Put"));
databaseParameters.put(GET_PARAMETERS, new DatabaseParameters("Get"));
databaseParameters.put(LS_PARAMETERS, new DatabaseParameters("Ls"));
databaseParameters.put(COPY_PARAMETERS, new DatabaseParameters("Copy"));
databaseParameters.put(BRINGONLINE_PARAMETERS, new DatabaseParameters("Bring Online"));
databaseParameters.put(RESERVE_PARAMETERS, new DatabaseParameters("Reserve Space"));
}
public ImmutableMap<String,String> getPingExtraInfo()
{
return pingExtraInfo;
}
public void setPingExtraInfo(Map<String,String> additionalInfo)
{
pingExtraInfo = ImmutableMap.copyOf(additionalInfo);
}
/** Getter for property urlcopy.
* @return Value of property urlcopy.
*/
public String getUrlcopy() {
return urlcopy;
}
/** Setter for property urlcopy.
* @param urlcopy New value of property urlcopy.
*/
public void setUrlcopy(String urlcopy) {
this.urlcopy = urlcopy;
}
/** Getter for property gsiftpclinet.
* @return Value of property gsiftpclinet.
*/
public String getGsiftpclinet() {
return gsiftpclinet;
}
/** Setter for property gsiftpclinet.
* @param gsiftpclinet New value of property gsiftpclinet.
*/
public void setGsiftpclinet(String gsiftpclinet) {
this.gsiftpclinet = gsiftpclinet;
}
/** Getter for property gsissl.
* @return Value of property gsissl.
*/
public boolean isGsissl() {
return gsissl;
}
/** Setter for property gsissl.
* @param gsissl New value of property gsissl.
*/
public void setGsissl(boolean gsissl) {
this.gsissl = gsissl;
}
/** Getter for property debug.
* @return Value of property debug.
*/
public boolean isDebug() {
return debug;
}
/** Setter for property debug.
* @param debug New value of property debug.
*/
public void setDebug(boolean debug) {
this.debug = debug;
}
/** Getter for property buffer_size.
* @return Value of property buffer_size.
*/
public int getBuffer_size() {
return buffer_size;
}
/** Setter for property buffer_size.
* @param buffer_size New value of property buffer_size.
*/
public void setBuffer_size(int buffer_size) {
this.buffer_size = buffer_size;
}
/** Getter for property tcp_buffer_size.
* @return Value of property tcp_buffer_size.
*/
public int getTcp_buffer_size() {
return tcp_buffer_size;
}
/** Setter for property tcp_buffer_size.
* @param tcp_buffer_size New value of property tcp_buffer_size.
*/
public void setTcp_buffer_size(int tcp_buffer_size) {
this.tcp_buffer_size = tcp_buffer_size;
}
/** Getter for property port.
* @return Value of property port.
*/
public int getPort() {
return port;
}
/** Setter for property port.
* @param port New value of property port.
*/
public void setPort(int port) {
this.port = port;
}
/**
* Getter for property authzCacheLifetime.
* @return Value of property authzCacheLifetime.
*/
public long getAuthzCacheLifetime() {
return authzCacheLifetime;
}
/** Setter for property authzCacheLifetime.
* @param authzCacheLifetime New value of property authzCacheLifetime.
*/
public void setAuthzCacheLifetime(long authzCacheLifetime) {
this.authzCacheLifetime = authzCacheLifetime;
}
/** Setter for property srm_root.
* @param srm_root New value of property srm_root.
*/
public void setSrm_root(String srm_root) {
this.srm_root = srm_root;
}
/** Getter for property srm_root.
* @return Value of property srm_root.
*/
public String getSrm_root() {
return srm_root;
}
/** Getter for property proxies_directory.
* @return Value of property proxies_directory.
*/
public String getProxies_directory() {
return proxies_directory;
}
/** Setter for property proxies_directory.
* @param proxies_directory New value of property proxies_directory.
*/
public void setProxies_directory(String proxies_directory) {
this.proxies_directory = proxies_directory;
}
/** Getter for property timeout.
* @return Value of property timeout.
*/
public int getTimeout() {
return timeout;
}
/** Setter for property timeout.
* @param timeout New value of property timeout.
*/
public void setTimeout(int timeout) {
this.timeout = timeout;
}
/** Getter for property timeout_script.
* @return Value of property timeout_script.
*/
public String getTimeout_script() {
return timeout_script;
}
/** Setter for property timeout_script.
* @param timeout_script New value of property timeout_script.
*/
public void setTimeout_script(String timeout_script) {
this.timeout_script = timeout_script;
}
/**
* this method returns collection of the local srm hosts.
* A host part of the srm url (surl) is used to determine if the surl
* references file in this storage system.
* In case of the copy operation, srm needs to be able to tell the
* local surl from the remote one.
* Also SRM needs to refuse to perform operations on non local srm urls
* This collection cosists of hosts that are cosidered local by this srm server.
* This parameter has to be a collection because in case of the multihomed
* or distributed server it may have more than one network name.
*
* @return set of local srmhosts.
*/
public Set<String> getSrmHosts() {
synchronized(localSrmHosts) {
Set<String> srmhostsCopy = new HashSet<>(localSrmHosts);
return srmhostsCopy;
}
}
/**
* This method adds values to the collection of the local srm hosts.
* A host part of the srm url (surl) is used to determine if the surl
* references file in this storage system.
* In case of the copy operation, srm needs to be able to tell the
* local surl from the remote one.
* Also SRM needs to refuse to perform operations on non local srm urls
* This collection cosists of hosts that are cosidered local by this srm server.
* This parameter has to be a collection because in case of the multihomed
* or distributed server it may have more than one network name.
*
* @param srmhost additional value of srmhost.
*/
public void addSrmHost(String srmhost) {
synchronized(localSrmHosts) {
localSrmHosts.add(srmhost);
}
}
/**
* Sets the set of local srm hosts. See addSrmHost for details.
*/
public void setSrmHostsAsArray(String[] hosts) {
synchronized(localSrmHosts) {
localSrmHosts.clear();
localSrmHosts.addAll(Arrays.asList(hosts));
}
}
/** Getter for property authorization.
* @return Value of property authorization.
*/
public SRMAuthorization getAuthorization() {
return authorization;
}
/** Setter for property authorization.
* @param authorization New value of property authorization.
*/
public void setAuthorization(SRMAuthorization authorization) {
this.authorization = authorization;
}
private String timeToString(long value)
{
return (value == Long.MAX_VALUE) ? INFINITY : String.valueOf(value);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("\t\"defaultSpaceLifetime\" request lifetime: ").append(this.defaultSpaceLifetime );
sb.append("\n\t\"get\" request lifetime: ").append(this.getLifetime );
sb.append("\n\t\"bringOnline\" request lifetime: ").append(this.bringOnlineLifetime );
sb.append("\n\t\"put\" request lifetime: ").append(this.putLifetime );
sb.append("\n\t\"copy\" request lifetime: ").append(this.copyLifetime);
sb.append("\n\tdebug=").append(this.debug);
sb.append("\n\tgsissl=").append(this.gsissl);
sb.append("\n\tgridftp buffer_size=").append(this.buffer_size);
sb.append("\n\tgridftp tcp_buffer_size=").append(this.tcp_buffer_size);
sb.append("\n\tgridftp parallel_streams=").append(this.parallel_streams);
sb.append("\n\tgsiftpclinet=").append(this.gsiftpclinet);
sb.append("\n\turlcopy=").append(this.urlcopy);
sb.append("\n\tsrm_root=").append(this.srm_root);
sb.append("\n\ttimeout_script=").append(this.timeout_script);
sb.append("\n\turlcopy timeout in seconds=").append(this.timeout);
sb.append("\n\tproxies directory=").append(this.proxies_directory);
sb.append("\n\tport=").append(this.port);
sb.append("\n\tsrmHost=").append(getSrmHost());
sb.append("\n\tlocalSrmHosts=");
for(String host:this.getSrmHosts()) {
sb.append(host).append(", ");
}
sb.append("\n\tuseUrlcopyScript=").append(this.useUrlcopyScript);
sb.append("\n\tuseGsiftpForSrmCopy=").append(this.useGsiftpForSrmCopy);
sb.append("\n\tuseHttpForSrmCopy=").append(this.useHttpForSrmCopy);
sb.append("\n\tuseDcapForSrmCopy=").append(this.useDcapForSrmCopy);
sb.append("\n\tuseFtpForSrmCopy=").append(this.useFtpForSrmCopy);
sb.append("\n\t\t *** GetRequests Parameters **");
sb.append("\n\t\t request Lifetime in milliseconds =").append(this.getLifetime);
sb.append("\n\t\t max poll period in milliseconds =").append(this.getMaxPollPeriod);
sb.append("\n\t\t switch to async mode delay=").append(timeToString(this.getSwitchToAsynchronousModeDelay));
sb.append("\n\t\t *** BringOnlineRequests Parameters **");
sb.append("\n\t\t request Lifetime in milliseconds =").append(this.bringOnlineLifetime);
sb.append("\n\t\t max poll period in milliseconds =").append(this.bringOnlineMaxPollPeriod);
sb.append("\n\t\t switch to async mode delay=").append(timeToString(this.bringOnlineSwitchToAsynchronousModeDelay));
sb.append("\n\t\t *** LsRequests Parameters **");
sb.append("\n\t\t max poll period in milliseconds =").append(this.lsMaxPollPeriod);
sb.append("\n\t\t switch to async mode delay=").append(timeToString(this.lsSwitchToAsynchronousModeDelay));
sb.append("\n\t\t *** PutRequests Parameters **");
sb.append("\n\t\t request Lifetime in milliseconds =").append(this.putLifetime);
sb.append("\n\t\t max poll period in milliseconds =").append(this.putMaxPollPeriod);
sb.append("\n\t\t switch to async mode delay=").append(timeToString(this.putSwitchToAsynchronousModeDelay));
sb.append("\n\t\t *** ReserveSpaceRequests Parameters **");
sb.append("\n\t\t request Lifetime in milliseconds =").append(this.reserveSpaceLifetime);
sb.append("\n\t\t max poll period in milliseconds =").append(this.reserveSpaceMaxPollPeriod);
sb.append("\n\t\t *** CopyRequests Parameters **");
sb.append("\n\t\t request Lifetime in milliseconds =").append(this.copyLifetime);
sb.append("\n\t\t max poll period in milliseconds =").append(this.copyMaxPollPeriod);
databaseParameters.values().forEach(sb::append);
sb.append("\n\tstorage_info_update_period=").append(this.storage_info_update_period);
sb.append("\n\tqosPluginClass=").append(this.qosPluginClass);
sb.append("\n\tqosConfigFile=").append(this.qosConfigFile);
sb.append("\n\tclientDNSLookup=").append(this.clientDNSLookup);
sb.append( "\n\tclientTransport=").append(clientTransport);
return sb.toString();
}
/** Getter for property parallel_streams.
* @return Value of property parallel_streams.
*/
public int getParallel_streams() {
return parallel_streams;
}
/** Setter for property parallel_streams.
* @param parallel_streams New value of property parallel_streams.
*/
public void setParallel_streams(int parallel_streams) {
this.parallel_streams = parallel_streams;
}
/** Getter for property getLifetime.
* @return Value of property getLifetime.
*
*/
public long getGetLifetime() {
return getLifetime;
}
/** Setter for property getLifetime.
* @param getLifetime New value of property getLifetime.
*
*/
public void setGetLifetime(long getLifetime) {
this.getLifetime = getLifetime;
}
/** Getter for property putLifetime.
* @return Value of property putLifetime.
*
*/
public long getPutLifetime() {
return putLifetime;
}
/** Setter for property putLifetime.
* @param putLifetime New value of property putLifetime.
*
*/
public void setPutLifetime(long putLifetime) {
this.putLifetime = putLifetime;
}
/** Getter for property copyLifetime.
* @return Value of property copyLifetime.
*
*/
public long getCopyLifetime() {
return copyLifetime;
}
/** Setter for property copyLifetime.
* @param copyLifetime New value of property copyLifetime.
*
*/
public void setCopyLifetime(long copyLifetime) {
this.copyLifetime = copyLifetime;
}
/** Getter for property useUrlcopyScript.
* @return Value of property useUrlcopyScript.
*
*/
public boolean isUseUrlcopyScript() {
return useUrlcopyScript;
}
/** Setter for property useUrlcopyScript.
* @param useUrlcopyScript New value of property useUrlcopyScript.
*
*/
public void setUseUrlcopyScript(boolean useUrlcopyScript) {
this.useUrlcopyScript = useUrlcopyScript;
}
/** Getter for property useDcapForSrmCopy.
* @return Value of property useDcapForSrmCopy.
*
*/
public boolean isUseDcapForSrmCopy() {
return useDcapForSrmCopy;
}
/** Setter for property useDcapForSrmCopy.
* @param useDcapForSrmCopy New value of property useDcapForSrmCopy.
*
*/
public void setUseDcapForSrmCopy(boolean useDcapForSrmCopy) {
this.useDcapForSrmCopy = useDcapForSrmCopy;
}
/** Getter for property useGsiftpForSrmCopy.
* @return Value of property useGsiftpForSrmCopy.
*
*/
public boolean isUseGsiftpForSrmCopy() {
return useGsiftpForSrmCopy;
}
/** Setter for property useGsiftpForSrmCopy.
* @param useGsiftpForSrmCopy New value of property useGsiftpForSrmCopy.
*
*/
public void setUseGsiftpForSrmCopy(boolean useGsiftpForSrmCopy) {
this.useGsiftpForSrmCopy = useGsiftpForSrmCopy;
}
/** Getter for property useHttpForSrmCopy.
* @return Value of property useHttpForSrmCopy.
*
*/
public boolean isUseHttpForSrmCopy() {
return useHttpForSrmCopy;
}
/** Setter for property useHttpForSrmCopy.
* @param useHttpForSrmCopy New value of property useHttpForSrmCopy.
*
*/
public void setUseHttpForSrmCopy(boolean useHttpForSrmCopy) {
this.useHttpForSrmCopy = useHttpForSrmCopy;
}
/** Getter for property useFtpForSrmCopy.
* @return Value of property useFtpForSrmCopy.
*
*/
public boolean isUseFtpForSrmCopy() {
return useFtpForSrmCopy;
}
/** Setter for property useFtpForSrmCopy.
* @param useFtpForSrmCopy New value of property useFtpForSrmCopy.
*
*/
public void setUseFtpForSrmCopy(boolean useFtpForSrmCopy) {
this.useFtpForSrmCopy = useFtpForSrmCopy;
}
/** Getter for property recursiveDirectoryCreation.
* @return Value of property recursiveDirectoryCreation.
*
*/
public boolean isRecursiveDirectoryCreation() {
return recursiveDirectoryCreation;
}
/** Setter for property recursiveDirectoryCreation.
* @param recursiveDirectoryCreation New value of property recursiveDirectoryCreation.
*
*/
public void setRecursiveDirectoryCreation(boolean recursiveDirectoryCreation) {
this.recursiveDirectoryCreation = recursiveDirectoryCreation;
}
/** Getter for property advisoryDelete.
* @return Value of property advisoryDelete.
*
*/
public boolean isAdvisoryDelete() {
return advisoryDelete;
}
/** Setter for property advisoryDelete.
* @param advisoryDelete New value of property advisoryDelete.
*
*/
public void setAdvisoryDelete(boolean advisoryDelete) {
this.advisoryDelete = advisoryDelete;
}
public void setDataSource(DataSource ds) {
this.dataSource = ds;
}
public DataSource getDataSource()
{
return dataSource;
}
public void setTransactionManager(PlatformTransactionManager transactionManager)
{
this.transactionManager = transactionManager;
}
public PlatformTransactionManager getTransactionManager()
{
return transactionManager;
}
/**
* Set the maximum allowed client-assumed bandwidth. If clients make
* requests with too short a lifetime then they are assuming a bandwidth in
* excess of this maximum. Such requests will be given longer, more
* realistic lifetimes.
* @value the bandwidth in kiB/s or zero to disable this feature.
*/
public void setMaximumClientAssumedBandwidth(long value)
{
checkArgument(value >= 0, "Bandwidth must be 0 or a positive value");
maximumClientAssumedBandwidth = value;
}
/**
* Get the maximum allowed client-assumed bandwidth.
* @return the bandwidth in kiB/s or zero if this feature is disable.
*/
public long getMaximumClientAssumedBandwidth()
{
return maximumClientAssumedBandwidth;
}
/**
* Getter for property getMaxPollPeriod.
* @return Value of property getMaxPollPeriod.
*/
public long getGetMaxPollPeriod() {
return getMaxPollPeriod;
}
/**
* Setter for property getMaxPollPeriod.
* @param getMaxPollPeriod New value of property getMaxPollPeriod.
*/
public void setGetMaxPollPeriod(long getMaxPollPeriod) {
this.getMaxPollPeriod = getMaxPollPeriod;
}
/**
* Getter for property putMaxPollPeriod.
* @return Value of property putMaxPollPeriod.
*/
public long getPutMaxPollPeriod() {
return putMaxPollPeriod;
}
/**
* Setter for property putMaxPollPeriod.
* @param putMaxPollPeriod New value of property putMaxPollPeriod.
*/
public void setPutMaxPollPeriod(long putMaxPollPeriod) {
this.putMaxPollPeriod = putMaxPollPeriod;
}
/**
* Getter for property copyMaxPollPeriod.
* @return Value of property copyMaxPollPeriod.
*/
public long getCopyMaxPollPeriod() {
return copyMaxPollPeriod;
}
/**
* Setter for property copyMaxPollPeriod.
* @param copyMaxPollPeriod New value of property copyMaxPollPeriod.
*/
public void setCopyMaxPollPeriod(long copyMaxPollPeriod) {
this.copyMaxPollPeriod = copyMaxPollPeriod;
}
/**
* Getter for property reserveSpaceMaxPollPeriod.
* @return Value of property reserveSpaceMaxPollPeriod.
*/
public long getReserveSpaceMaxPollPeriod() {
return reserveSpaceMaxPollPeriod;
}
/**
* Setter for property reserveSpaceMaxPollPeriod.
* @param reserveSpaceMaxPollPeriod New value of property reserveSpaceMaxPollPeriod.
*/
public void setReserveSpaceMaxPollPeriod(long reserveSpaceMaxPollPeriod) {
this.reserveSpaceMaxPollPeriod = reserveSpaceMaxPollPeriod;
}
/**
* Getter for property storage_info_update_period.
* @return Value of property storage_info_update_period.
*/
public long getStorage_info_update_period() {
return storage_info_update_period;
}
/**
* Setter for property storage_info_update_period.
* @param storage_info_update_period New value of property storage_info_update_period.
*/
public void setStorage_info_update_period(long storage_info_update_period) {
this.storage_info_update_period = storage_info_update_period;
}
public String getQosPluginClass() {
return qosPluginClass;
}
public void setQosPluginClass(String qosPluginClass) {
this.qosPluginClass = Strings.emptyToNull(qosPluginClass);
}
public String getQosConfigFile() {
return qosConfigFile;
}
public void setQosConfigFile(String qosConfigFile) {
this.qosConfigFile = Strings.emptyToNull(qosConfigFile);
}
public long getDefaultSpaceLifetime() {
return defaultSpaceLifetime;
}
public void setDefaultSpaceLifetime(long defaultSpaceLifetime) {
this.defaultSpaceLifetime = defaultSpaceLifetime;
}
public Integer getJdbcExecutionThreadNum() {
return jdbcExecutionThreadNum;
}
public void setJdbcExecutionThreadNum(Integer jdbcExecutionThreadNum) {
this.jdbcExecutionThreadNum = jdbcExecutionThreadNum;
}
public Integer getMaxQueuedJdbcTasksNum() {
return maxQueuedJdbcTasksNum;
}
public void setMaxQueuedJdbcTasksNum(Integer maxQueuedJdbcTasksNum) {
this.maxQueuedJdbcTasksNum = maxQueuedJdbcTasksNum;
}
public String getCredentialsDirectory() {
return credentialsDirectory;
}
public void setCredentialsDirectory(String credentialsDirectory) {
this.credentialsDirectory = credentialsDirectory;
}
public boolean isOverwrite() {
return overwrite;
}
public void setOverwrite(boolean overwrite) {
this.overwrite = overwrite;
}
public int getSizeOfSingleRemoveBatch() {
return sizeOfSingleRemoveBatch;
}
public void setSizeOfSingleRemoveBatch(int size) {
sizeOfSingleRemoveBatch=size;
}
public long getGetSwitchToAsynchronousModeDelay()
{
return getSwitchToAsynchronousModeDelay;
}
public void setGetSwitchToAsynchronousModeDelay(long time)
{
getSwitchToAsynchronousModeDelay = time;
}
public long getPutSwitchToAsynchronousModeDelay()
{
return putSwitchToAsynchronousModeDelay;
}
public void setPutSwitchToAsynchronousModeDelay(long time)
{
putSwitchToAsynchronousModeDelay = time;
}
public long getLsSwitchToAsynchronousModeDelay()
{
return lsSwitchToAsynchronousModeDelay;
}
public void setLsSwitchToAsynchronousModeDelay(long time)
{
lsSwitchToAsynchronousModeDelay = time;
}
public long getBringOnlineSwitchToAsynchronousModeDelay()
{
return bringOnlineSwitchToAsynchronousModeDelay;
}
public void setBringOnlineSwitchToAsynchronousModeDelay(long time)
{
bringOnlineSwitchToAsynchronousModeDelay = time;
}
public int getMaxNumberOfLsLevels() {
return maxNumberOfLsLevels;
}
public void setMaxNumberOfLsLevels(int max_ls_levels) {
maxNumberOfLsLevels=max_ls_levels;
}
public int getMaxNumberOfLsEntries() {
return maxNumberOfLsEntries;
}
public void setMaxNumberOfLsEntries(int max_ls_entries) {
maxNumberOfLsEntries=max_ls_entries;
}
public boolean isOverwrite_by_default() {
return overwrite_by_default;
}
public void setOverwrite_by_default(boolean overwrite_by_default) {
this.overwrite_by_default = overwrite_by_default;
}
public SRMUserPersistenceManager getSrmUserPersistenceManager() {
return srmUserPersistenceManager;
}
public void setSrmUserPersistenceManager(SRMUserPersistenceManager srmUserPersistenceManager) {
this.srmUserPersistenceManager = srmUserPersistenceManager;
}
public long getBringOnlineMaxPollPeriod() {
return bringOnlineMaxPollPeriod;
}
public void setBringOnlineMaxPollPeriod(long bringOnlineMaxPollPeriod) {
this.bringOnlineMaxPollPeriod = bringOnlineMaxPollPeriod;
}
public long getBringOnlineLifetime() {
return bringOnlineLifetime;
}
public void setBringOnlineLifetime(long bringOnlineLifetime) {
this.bringOnlineLifetime = bringOnlineLifetime;
}
public long getLsMaxPollPeriod() {
return lsMaxPollPeriod;
}
public void setLsMaxPollPeriod(long lsMaxPollPeriod) {
this.lsMaxPollPeriod = lsMaxPollPeriod;
}
/**
* @return the clientDNSLookup
*/
public boolean isClientDNSLookup() {
return clientDNSLookup;
}
/**
* @param clientDNSLookup the clientDNSLookup to set
*/
public void setClientDNSLookup(boolean clientDNSLookup) {
this.clientDNSLookup = clientDNSLookup;
}
/**
* @return the rrdDirectory
*/
public String getCounterRrdDirectory() {
return counterRrdDirectory;
}