@Override public synchronized void printSetup(PrintWriter pw) { pw.println("#\n# Pool to Pool (P2P)\n#"); pw.println("pp set max active " + _maxActive); pw.println("pp set pnfs timeout " + (_pnfs.getTimeoutInMillis() / 1000L)); if (_interface != null) { pw.println("pp interface " + _interface.getHostAddress()); } }
private synchronized PoolMonitor getPoolMonitor() { try { if (poolMonitor == null) { long deadline = addWithInfinity(System.currentTimeMillis(), poolManagerStub.getTimeoutInMillis()); do { wait(subWithInfinity(deadline, System.currentTimeMillis())); } while (poolMonitor == null || deadline <= System.currentTimeMillis()); if (poolMonitor == null) { throw new RemoteConnectFailureException( "Cached pool information is not yet available.", null); } } if (lastRefreshTime < System.currentTimeMillis() - TimeUnit.MINUTES.toMillis(5)) { LOGGER.warn("Cached pool information is older than 5 minutes. Please check pool manager."); } return poolMonitor; } catch (InterruptedException e) { throw new RemoteProxyFailureException("Failed to fetch pool monitor: " + e.getMessage(), e); } }
private Date getExpirationTimeForPoolSelection() { long now = System.currentTimeMillis(); long timeout = _poolManagerStub.getTimeoutInMillis(); return new Date(now + 2 * (timeout + RETRY_DELAY)); }
private Date getExpirationTimeForSettingFlag() { long now = System.currentTimeMillis(); long timeout = _poolStub.getTimeoutInMillis(); return new Date(now + 2 * timeout); }
private Date getExpirationTimeForNameSpaceLookup() { long now = System.currentTimeMillis(); long timeout = _pnfsStub.getTimeoutInMillis(); return new Date(now + 2 * (timeout + RETRY_DELAY)); }