/** * Just record that this workspace is being used, without paying any attention to the sycnhronization support. */ public synchronized Lease record(FilePath p) { log("recorded "+p); Entry old = inUse.put(p, new Entry(p, false)); if (old!=null) throw new AssertionError("Tried to record a workspace already owned: "+old); return lease(p); }
/** * See {@link #acquire(FilePath)} * * @param quick * If true, indicates that the acquired workspace will be returned quickly. * This makes other calls to {@link #allocate(FilePath)} to wait for the release of this workspace. */ public synchronized Lease acquire(FilePath p, boolean quick) throws InterruptedException { while (inUse.containsKey(p)) wait(); log("acquired "+p); inUse.put(p,new Entry(p,quick)); return lease(p); }
/** * Just record that this workspace is being used, without paying any * attention to the sycnhronization support. */ public synchronized Lease record(FilePath p) { log("recorded " + p); Entry old = inUse.put(p, new Entry(p, false)); if (old != null) { throw new AssertionError("Tried to record a workspace already owned: " + old); } return lease(p); }
/** * Just record that this workspace is being used, without paying any attention to the sycnhronization support. */ public synchronized Lease record(FilePath p) { log("recorded "+p); Entry old = inUse.put(p, new Entry(p, false)); if (old!=null) throw new AssertionError("Tried to record a workspace already owned: "+old); return lease(p); }
/** * Just record that this workspace is being used, without paying any attention to the sycnhronization support. */ public synchronized Lease record(FilePath p) { log("recorded "+p); Entry old = inUse.put(p, new Entry(p, false)); if (old!=null) throw new AssertionError("Tried to record a workspace already owned: "+old); return lease(p); }
/** * See {@link #acquire(FilePath)} * * @param quick * If true, indicates that the acquired workspace will be returned quickly. * This makes other calls to {@link #allocate(FilePath)} to wait for the release of this workspace. */ public synchronized Lease acquire(FilePath p, boolean quick) throws InterruptedException { while (inUse.containsKey(p)) wait(); log("acquired "+p); inUse.put(p,new Entry(p,quick)); return lease(p); }
/** * See {@link #acquire(FilePath)} * * @param quick If true, indicates that the acquired workspace will be * returned quickly. This makes other calls to {@link #allocate(FilePath)} * to wait for the release of this workspace. */ public synchronized Lease acquire(FilePath p, boolean quick) throws InterruptedException { while (inUse.containsKey(p)) { wait(); } log("acquired " + p); inUse.put(p, new Entry(p, quick)); return lease(p); }
/** * See {@link #acquire(FilePath)} * * @param quick * If true, indicates that the acquired workspace will be returned quickly. * This makes other calls to {@link #allocate(FilePath)} to wait for the release of this workspace. */ public synchronized Lease acquire(FilePath p, boolean quick) throws InterruptedException { while (inUse.containsKey(p)) wait(); log("acquired "+p); inUse.put(p,new Entry(p,quick)); return lease(p); }