Package hudson.node_monitors.DiskSpaceMonitorDescriptor

Examples of hudson.node_monitors.DiskSpaceMonitorDescriptor.DiskSpace


                        multiplier*=1024;
                    size = size.substring(0,size.length()-1);
                }
            }

            return new DiskSpace("", (long)(Double.parseDouble(size.trim())*multiplier));
        }
View Full Code Here


        @IgnoreJRERequirement
        public DiskSpace invoke(File f, VirtualChannel channel) throws IOException {
            try {
                long s = f.getUsableSpace();
                if(s<=0)    return null;
                return new DiskSpace(f.getCanonicalPath(), s);
            } catch (LinkageError e) {
                // pre-mustang
                return null;
            }
        }
View Full Code Here

        SlaveComputer c = s.getComputer();
        c.connect(false).get(); // wait until it's connected
        if(c.isOffline())
            fail("Slave failed to go online: "+c.getLog());

        DiskSpace du = TemporarySpaceMonitor.DESCRIPTOR.monitor(c);
        du.toHtml();
        assertTrue(du.size>0);
    }
View Full Code Here

        }
    }

    @Override
    public Object data(Computer c) {
      DiskSpace size = (DiskSpace) super.data(c);
        if(size!=null && size.size < getThresholdBytes()) {
          size.setTriggered(true);
          if(getDescriptor().markOffline(c,size)) {
            LOGGER.warning(Messages.DiskSpaceMonitor_MarkedOffline(c.getName()));
          }
        }
        return size;
View Full Code Here

                // if the disk is really filled up we can't even create a single file,
                // so calling File.createTempFile and figuring out the directory won't reliably work.
                f = new File(System.getProperty("java.io.tmpdir"));
                long s = f.getUsableSpace();
                if(s<=0)    return null;
                return new DiskSpace(f.getCanonicalPath(), s);
            } catch (LinkageError e) {
                // pre-mustang
                return null;
            }
        }
View Full Code Here

                // if the disk is really filled up we can't even create a single file,
                // so calling File.createTempFile and figuring out the directory won't reliably work.
                f = new File(System.getProperty("java.io.tmpdir"));
                long s = f.getUsableSpace();
                if(s<=0)    return null;
                return new DiskSpace(s);
            } catch (LinkageError e) {
                // pre-mustang
                return null;
            }
        }
View Full Code Here

                        multiplier*=1024;
                    size = size.substring(0,size.length()-1);
                }
            }

            return new DiskSpace((long)(Double.parseDouble(size.trim())*multiplier));
        }
View Full Code Here

        @IgnoreJRERequirement
        public DiskSpace invoke(File f, VirtualChannel channel) throws IOException {
            try {
                long s = f.getUsableSpace();
                if(s<=0)    return null;
                return new DiskSpace(s);
            } catch (LinkageError e) {
                // pre-mustang
                return null;
            }
        }
View Full Code Here

TOP

Related Classes of hudson.node_monitors.DiskSpaceMonitorDescriptor.DiskSpace

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.