/** * Takes a fresh snapshot of the non static process properties. * * @return a fresh {@link ProcessInfoSnapshot} */ public ProcessInfoSnapshot freshSnapshot() { refresh(); return snapshot; }
/** * Takes a fresh snapshot of the non static process properties. * * @return a fresh {@link ProcessInfoSnapshot} */ public ProcessInfoSnapshot freshSnapshot() { refresh(); return snapshot; }
/** * Returns a {@link ProcessInfo} instance for the parent of this process. * * This method uses the parent process id which is not static (it can change if the parent process dies before its * child). So in theory it should be moved to the {@link ProcessInfoSnapshot} type. * * In practice, it stays here because the parent {@link ProcessInfo} instance is cached after creation. * * @since 4.4 */ public ProcessInfo getParentProcess() throws SystemInfoException { if (this.parentProcess == null) { this.parentProcess = new ProcessInfo(priorSnaphot().getParentPid(), sigar); } else { this.parentProcess.refresh(); } return this.parentProcess; }
/** * Returns a {@link ProcessInfo} instance for the parent of this process. * * This method uses the parent process id which is not static (it can change if the parent process dies before its * child). So in theory it should be moved to the {@link ProcessInfoSnapshot} type. * * In practice, it stays here because the parent {@link ProcessInfo} instance is cached after creation. * * @since 4.4 */ public ProcessInfo getParentProcess() throws SystemInfoException { if (this.parentProcess == null) { this.parentProcess = new ProcessInfo(priorSnaphot().getParentPid(), sigar); } else { this.parentProcess.refresh(); } return this.parentProcess; }
@Override public void refresh() throws SystemInfoException { super.refresh();
@Override public void refresh() throws SystemInfoException { super.refresh();