コード例 #1
0
 public long getThresholdBytes() {
   if (freeSpaceThreshold == null)
     return DEFAULT_THRESHOLD; // backward compatibility with the data format that didn't have
   // 'freeSpaceThreshold'
   try {
     return DiskSpace.parse(freeSpaceThreshold).size;
   } catch (ParseException e) {
     return DEFAULT_THRESHOLD;
   }
 }
コード例 #2
0
 @DataBoundConstructor
 public AbstractDiskSpaceMonitor(String threshold) throws ParseException {
   this.freeSpaceThreshold = threshold;
   DiskSpace.parse(threshold); // make sure it parses
 }